-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
ER: Better error reporting in get_data_yahoo #4025
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
Comments
This is similar to the issue cropping up in other tests because some of the other network tests silently skip symbols that error. E.g. #4029, #4028. How should pandas handle getting multiple symbols? Maybe they should mirror try:
some_get_data_func(symbol)
except IOError as e: #IOError covers most/all network errors, possibly need OSError too
msg = "Could not get information for %s, failure was: %r" % (symbol, error)
if error_bad_lines:
raise IOError(msg)
elif warn_bad_lines:
warnings.warn(msg)
else:
errors.append((symbol, msg)) |
why not just raise an error? i'm not sure about "kicking out" bad symbols since after all they are invalid. throw an error telling which one was bad... |
well, what happens if you have 200 symbols (or symbols that you're getting from elsewhere) and the user wants to choose how to handle it? (e.g., just ignore symbols that fail) Would you have to call it twice? only use one symbol at a time? |
i just feel weird about the warn + error options. i think having the error option is a good idea but not warnings, because e.g., if 100 out of 200 symbols generate warnings that is not very useful |
what about returning not found symbols? |
more interactive that way you can visually inspect rather than having to run things a bunch of times to see the warnings |
what or how would you return something? (given that the output result is a dataframe with the data) |
have a |
empty list if |
this could be done in 0.12 |
no......very easy to fix this; if a symbol is bad then then data is simply |
hm yes. not sure why i didn't think about that. ok then |
remember GIGO; pandas is not to determine what is good or bad, the service does that |
@jreback, the |
@jreback good solution 👍 |
I'll be busy today, but could try and get a PR submitted for later today if we want to try and include this in 11.1? |
sure |
@nehalecky PR on this? |
closing as stale |
reported by a book reader
The text was updated successfully, but these errors were encountered: