-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global curl settings not used in handle #177
Comments
Thanks for the report! I'll look into how to ensure global curl settings are honored. |
I got the GetSymbols.R script to work by temporarily adding handle_setopt(h, ssl_verifypeer = 0) when the handle is created. |
I write : library(quantmod)
getSymbols("AAPL") I get :
sessionInfo()
R version 3.4.1 (2017-06-30)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] quantmod_0.4-10 TTR_0.23-1 xts_0.9-7 zoo_1.8-0
loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1 curl_2.7 grid_3.4.1 lattice_0.20-35 Any ideas? |
@PsaksuMeRap: I think you are experiencing a different issue. Maybe you can create a separate issue? |
@PsaksuMeRap Are you saying that you get an error when calling w <- curl::curl_fetch_memory("https://finance.yahoo.com",curl::new_handle(verbose=TRUE)) |
Hi Joshua,
I tried it and still get no connection
The output is the following:
I get : Rebuilt URL to: finance.yahoo.com * timeout on name lookup is not supported * Trying 87.248.118.23... * TCP_NODELAY set * After 4976ms connect time, move on! * connect to 87.248.118.23 port 443 failed: Timed out * Trying 87.248.118.22... * TCP_NODELAY set * After 2359ms connect time, move on! * connect to 87.248.118.22 port 443 failed: Timed out * Failed to connect to finance.yahoo.com port 443: Timed out * Closing connection 0 Error in curl::curl_fetch_memory("finance.yahoo.com";, curl::new_handle(verbose = TRUE)) : Couldn't connect to server
Do you have any further suggestions?
Thanks again for the help!
…Sent from my iPhone
On 6 Jul 2017, at 15:06, Joshua Ulrich ***@***.***> wrote:
@PsaksuMeRap Are you saying that you get an error when calling getSymbols, but curl requests work outside of getSymbols? Does this command work?
w <- curl::curl_fetch_memory("https://finance.yahoo.com",curl::new_handle(verbose=TRUE))
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@PsaksuMeRap that seems to be an issue with your local setup being able to connect to the internet. I don't think it's related to this GitHub issue. Please email me if you would like to continue the discussion. @CajH A possible solution to this problem is to pass curl options via R> curl::new_handle(foo=1)
Error in handle_setopt(h, ...) : Unknown option: foo Or, maybe we put them in a special argument (e.g. |
@CajH |
I think the set_config() function is from the httr package. I am not sure how options are supposed to be propagated with curl. RCurl seems to use global settings. |
Same problem here, but the error code is:
@CajH I followed your step to put |
Solution from curl: |
User's network settings may require specific curl settings to be able to connect to the internet. Add curl.options argument to getSymbols.yahoo(), with a default value the same as the default .list argument value for the curl functions that accept curl options. Fixes #177.
@CajH Can you please test the patch I just pushed to the |
I get this:
When running this:
After doing this:
|
@CajH Sorry for not being more explicit. You need to pass the goog <- getSymbols("GOOG", curl.options = list(ssl_verifypeer = 0), auto.assign = FALSE) |
@joshuaulrich Thanks! We got this to work! |
@CajH Awesome! Thanks again for the report and testing! |
Adding the curl.options = list(ssl_verifypeer = 0) parameter fixes issues i was having with the tq_get() command for tidyquant |
Description
Settings for curl can be set using for example:
The ssl_verifypeer = 0L setting is common when overriding certificate validity checks.
Expected behavior
The curl setting should be applied to the handle.
Minimal, reproducible example
In an environment where a proxy has an intercept certificate which cannot be authenticated:
Might generate an error:
Session Info
The text was updated successfully, but these errors were encountered: