1. Curl Error
- Posted by euphoric (admin) Dec 11, 2017
- 1229 views
I'm getting this error when running test_curl_.exw.
<0026>:: Argument 2 of curl_extract_cookies (optional) was omitted, but there is no default value defined cookies = curl_extract_cookies(res[3]) ^
How do I fix this?
2. Re: Curl Error
- Posted by Ekhnat0n Dec 11, 2017
- 1208 views
Would curl_extract_cookies(res[3][1],res[3][2],res[3][3])* do the trick?
- res[3][2] being an empty sequence
3. Re: Curl Error
- Posted by jmduro Dec 12, 2017
- 1210 views
All functions with an optional argument expect a sequence as a list of options. When no option is required, pass an empty sequence as optional argument.
cookies = curl_extract_cookies(res[3], {})
Jean-Marc
4. Re: Curl Error
- Posted by euphoric (admin) Dec 12, 2017
- 1161 views
All functions with an optional argument expect a sequence as a list of options. When no option is required, pass an empty sequence as optional argument.
cookies = curl_extract_cookies(res[3], {})
Jean-Marc
Hi, Jean-Marc,
This error was in the test file in the archive. You might want to check that in your source.
Thank you!
5. Re: Curl Error
- Posted by jmduro Dec 12, 2017
- 1217 views
Thank you Euphoric,
I will check the test code.
Jean-Marc
6. Re: Curl Error
- Posted by jmduro Dec 12, 2017
- 1195 views
Which interpreter are you using ? Which library and which version ?
My test code for Eu3 (v1.0.5) uses the correct syntax.
Eu4 has a different syntax: optional argument is an integer which can be omitted.
Jean-Marc
7. Re: Curl Error
- Posted by euphoric (admin) Dec 12, 2017
- 1186 views
Which interpreter are you using ? Which library and which version ?
My test code for Eu3 (v1.0.5) uses the correct syntax.
Eu4 has a different syntax: optional argument is an integer which can be omitted.
I'm using 4.1.0, Revision Date 2015-02-02.
8. Re: Curl Error
- Posted by jmduro Dec 14, 2017
- 1189 views
You should have been using Eu4 Standard Library. In this one, there is no sequence named optional as a second argument as in Eu3 Standard Library.
Did you use Eu3 Standard Library instead of Eu4 Standard Library?
Jean-Marc
9. Re: Curl Error
- Posted by euphoric (admin) Dec 22, 2017
- 1082 views
You should have been using Eu4 Standard Library. In this one, there is no sequence named optional as a second argument as in Eu3 Standard Library.
Did you use Eu3 Standard Library instead of Eu4 Standard Library?
Jean-Marc
Are we talking about the test file? I'm just trying to run it with my current Euphoria setup, which would be the Eu4 Standard Library.
Oh... do I have to modify the test file before it will run with Eu4?