-
Notifications
You must be signed in to change notification settings - Fork 37
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
Intermittent issue with Yahoo datasource #60
Comments
Hi ! i think, i have met the same error:
|
This issue is fixed (very simple change) with #66 and #68 (same as #66, but with test case) - can we get one of those two merged into the main branch? @blais It seems like at least one cause is due to an issue with mutual funds while the market is open - where there's a timestamp for the last date in the query range, but the values are all null. Example JSON response in #68 |
Facing the same issue/crash even with the PR #66 applied:
Woah I guess for cryptos yahoo is not that reliable: https://finance.yahoo.com/quote/DOT-USD/history?p=DOT-USD |
@Nexus2k Can you reproduce the error, and post the JSON the API is returning for you when it exhibits the issue? It seems to work for me right now:
The JSON has no null values in the prices for me, and has the "timestamp" field your error is complaining about.
|
Check https://finance.yahoo.com/quote/DOT-USD/history?p=DOT-USD so "USD:yahoo/DOT-USD" for some reason it has incomplete historic pricing. I've switched to coinbase for the pricing info of that now... |
@Nexus2k
Your issue was addressed in 6fe4c5e That said, #66 and #68 (same as #66, but with test case) address the issue described in this issue - it would be nice to have them merged into the main branch. |
Not sure if this is related or some other issue, but I was running into this same problem of
|
The caching code uses the shelve module and you didn't build dbm.
Install gdbm-dev and rebuild your Python.
…On Wed, Mar 8, 2023 at 8:25 PM Michael Minar ***@***.***> wrote:
Not sure if this is related or some other issue, but I was running into
this same problem of TypeError: conversion from NoneType to Decimal is
not supported. I then did a pip upgrade of bean-price and tried running
again, because of the fix here. I'm now getting an error with Celery and
importing dbm much earlier in the process.
Traceback (most recent call last):
File "/usr/local/bin/bean-price", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/mminar/git/beanprice/beanprice/price.py", line 839, in main
args, jobs, entries, dcontext = process_args()
^^^^^^^^^^^^^^
File "/Users/mminar/git/beanprice/beanprice/price.py", line 771, in process_args
setup_cache(args.cache_filename, args.clear_cache)
File "/Users/mminar/git/beanprice/beanprice/price.py", line 564, in setup_cache
_CACHE = shelve.open(cache_filename, flag=flag)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ***@***.***/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ***@***.***/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shelve.py", line 227, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
^^^^^^^^^^^^^^^^^^^^^^^^
File ***@***.***/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dbm/__init__.py", line 91, in open
raise error[0]("db type is {0}, but the module is not "
dbm.error: db type is dbm.gnu, but the module is not available
—
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACSBEYGW6P6Y5CY7FID2KLW3EWRFANCNFSM5BFWG2LQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you Blais, apologies but i'm not quite sure how to do that on macOS. Do you have a few more bread crumbs? I was just using brew to install gdbm, but brew says there is no formula for gdbm-dev. And i was also using brew to upgrade python...so I assume you just mean to do an upgrade there as well? or is rebuilding a more complicated step? |
Please not that Celery has nothing to do with this. There is a |
Michael: this is an issue with your setup, not a Beancount issue. |
When trying to update from Yahoo I get intermittent errors
However, this appears to corrupt the cache, since subsequent attempts to update return
The only way forward is to delete the cache.
Is it possible to treat this as a soft error for that data point and simply skip it?
The text was updated successfully, but these errors were encountered: