-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
more yahoo test errors #4182
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
Is there a reason to actually download the data each time? Would it make
Might require some refactoring of io/DataReader to use classes conforming Could probably shrink it to two required functions
|
i hadn't seen u around these parts in a while; was wondering where ya went :) you're right on all points, want to put up a PR? i would be eternally grateful. i'm so tired of dealing with these errors and i never use this functionality. but...what you're describing is a major rewrite of these fails are actually "bugs" (sort of)...if all are @jreback do you have any suggestions here? this issue will show up again since when no data are found there's a i'm a torn between wanting to get the release out and fixing this for real™, the for real fix is going to be something similar to @jtratner's ideas but will probably take a few iterations to get right... |
what is the |
d = {}
keys = 'a', 'b', 'c' # pretend these are stocks
for k in keys:
d[k] = np.nan
p = Panel(d) # fails because there are no 2D items in the dict |
error message is bit cryptic, but i'm ignoring that issue for now |
code that fails is not that different from my example stocks = {}
for sym_group in _in_chunks(symbols, chunksize):
for sym in sym_group:
try:
stocks[sym] = method(sym, start, end, retry_count, pause)
except IOError:
warnings.warn('Failed to read symbol: {0!r}, replacing with '
'NaN.'.format(sym), SymbolWarning)
stocks[sym] = np.nan
return Panel(stocks).swapaxes('items', 'minor') |
yep...you could do it like this
the but a-prior you prob don't know the so maybe
or just keep a flag if there are any valid stocks or catch the construction error on the Panel |
i'll throw a RemoteDataError, joy |
@cpcloud haha, yeah...definitely been on the lighter side recently. I have to work and am taking CS classes on the side, so I have a busy schedule (+ I'm waiting for 0.12 to come out to push some of those PRs 😄). I'd be happy to work something up in the long-term, I just don't have time this week (or next week). Personally, I think you should monkey-patch this to work for now (e.g., by having it catch the failure with Panel construction and throw a graceful error) and get the release out. My guess is that io/data is going to be a constantly moving target anyways until we piece apart the bigger functions and force 'em to do smaller tasks. |
On a similar note, I'm always struck by how much time you and @jreback put into pandas. pretty neat. |
@jtratner its magic! :) |
i love a good game of whack-a-mole.
https://travis-ci.org/pydata/pandas/jobs/8900734
The text was updated successfully, but these errors were encountered: