-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
getSymbols.yahoo warnings #307
Comments
Hi - very glad to find this as am having a similar issue..
|
well, you still get SXY.AX, but on the second attempt, when it says "done". |
Thanks for the report and patch! I left the code that creates a new handle, URL, and connection. We may need a new handle if the download fails because of some issue with the existing handle. Other than that, your patch was perfect! |
We fixed this issue in getSymbols() in #307. Basically, the curl connection and/or download may fail for one symbol, and we don't want to throw an error and stop processing all subsequent symbols. Create a new retry.yahoo() function that throws the warning about the first download failing, then reconstructs the URL and tries the download again. It throws an error if the second download fails, like it did for getSymbols(). Fixes #314.
Description
warnings about failed downloads when they shouldn't be failing. It happens when getSymbols.yahoo gets multiple symbols, some of them invalid.
Expected behavior
getSymbols.yahoo to skip an invalid symbol and succeed getting the next valid one the first time
Minimal, reproducible example
Solution
close and reopen the same connection, instead of abandon it and generate a new handle with a new connection.
It's a small change to consider for the next version of quantmod. Prefer to leave it at that, too tiny for a pull request IMHO.
The text was updated successfully, but these errors were encountered: