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

ImportError: cannot import name 'NaN' from 'numpy' #1

Open
guytao opened this issue Aug 22, 2024 · 3 comments
Open

ImportError: cannot import name 'NaN' from 'numpy' #1

guytao opened this issue Aug 22, 2024 · 3 comments

Comments

@guytao
Copy link

guytao commented Aug 22, 2024

from numpy import NaN as npNaN
ImportError: cannot import name 'NaN' from 'numpy' (/TradingBot-Based-on-MooMoo-main/venv/lib/python3.9/site-packages/numpy/init.py)

@LukeWang01
Copy link
Owner

There are so many version issues, I will make a update later. Thanks.

from numpy import NaN as npNaN ImportError: cannot import name 'NaN' from 'numpy' (/TradingBot-Based-on-MooMoo-main/venv/lib/python3.9/site-packages/numpy/init.py)

@LukeWang01
Copy link
Owner

from numpy import NaN as npNaN ImportError: cannot import name 'NaN' from 'numpy' (/TradingBot-Based-on-MooMoo-main/venv/lib/python3.9/site-packages/numpy/init.py)

I just update the final version, please check the requirment.txt file for all the libs, it should be fine now. Oherwise, please check your Python version.

@LukeWang01
Copy link
Owner

from numpy import NaN as npNaN ImportError: cannot import name 'NaN' from 'numpy' (/TradingBot-Based-on-MooMoo-main/venv/lib/python3.9/site-packages/numpy/init.py)

Hi for this issue, the reason is the pandas_ta use the old version or numpy.

To fix this, I replace pandas_ta with ta for the example stratrgy case.

Now, the bot should be good to run.

@LukeWang01 LukeWang01 reopened this Dec 10, 2024
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

No branches or pull requests

2 participants