alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.63k stars 377 forks source link

Dev #306

Closed adximize closed 3 years ago

adximize commented 3 years ago

hi, i don't know how to use github. But i want to report some issue with solution.

i got this error when i was fetching historical crypto data:

".../lib/python3.8/site-packages/investpy/crypto.py", line 534, in get_crypto_historical_data crypto_volume = int(info[5]) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"

So i changed the line 534 in crypto.py

crypto_volume = int(info[5]) --> crypto_volume = int(info[5] or 0)

and problem is solved.

Thank you for this awesome Python package!

alvarobartt commented 3 years ago

Hi @adximize! 🤗 You can either create an issue and I'll solve this, or create the PR from YOUR branch, as now you are trying to merge my dev branch into my master branch 😄 No worries, I'll help you as much as you need, just let me know which are your doubts regarding the GitHub usage and I'll be pleased to help you!

alvarobartt commented 3 years ago

Hi @adximize, did you read the message above? Could you please send me the investpy function call so that I can reproduce the issue and determine which is the best way to fix this?

:warning: Also remember to update the PR source, as currently you are using alvarobartt/dev branch, not your own branch!

alvarobartt commented 3 years ago

I've already solved it, before releasing investpy v1.0.4, mentioning you as this PR was not created properly as I told you above.

Thanks for the contribution :+1: