Skip to content
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

fix TypeError when no price is returned #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daniel-wells
Copy link

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

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.
@mbafford
Copy link
Contributor

mbafford commented Mar 1, 2022

I didn't see this PR when I fixed this in #68 as well. So these two are duplicates. My PR also has a test for this case.

@Nexus2k
Copy link

Nexus2k commented Mar 1, 2022

Keep corrupting the cache for me with these changes applied...

@mbafford
Copy link
Contributor

mbafford commented Mar 2, 2022

As mentioned here (#60 (comment)), 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants