Open daniel-wells opened 2 years ago
I didn't see this PR when I fixed this in https://github.com/beancount/beanprice/pull/68 as well. So these two are duplicates. My PR also has a test for this case.
Keep corrupting the cache for me with these changes applied...
As mentioned here (https://github.com/beancount/beanprice/issues/60#issuecomment-1056918222), the issue @Nexus2k is mentioning (timestamp
missing in the Yahoo response JSON) was solved already in an earlier commit, and is unrelated to what this is fixing (null price values in the prices arrays in the Yahoo response JSON).
Sometimes the yahoo source will return None as a price (I think due to the date being too recent), this will result in a TypeError "conversion from NoneType to Decimal is not supported" when conversion of the price to a Decimal is attempted.
See #60