0

When I run my script, which worked fine yesterday. I now get the error messages:

C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io\oifits.py:71: FutureWarning: In the future np.bool will be defined as the corresponding NumPy scalar. from numpy import double, bool, ma Traceback (most recent call last): File "C:\Users\chri\BA-Proj\astroray_io.py", line 1, in import ehtim File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim_init_.py", line 18, in from ehtim.imaging.imager_utils import imager_func File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\imaging\imager_utils.py", line 32, in import ehtim.image as image File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\image.py", line 47, in import ehtim.io.save File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io_init_.py", line 9, in from . import load File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io\load.py", line 35, in import ehtim.obsdata File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\obsdata.py", line 45, in import ehtim.io.save File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io\save.py", line 31, in import ehtim.io.writeoifits File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io\writeoifits.py", line 10, in import ehtim.io.oifits File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ehtim\io\oifits.py", line 71, in from numpy import double, bool, ma ImportError: cannot import name 'bool' from 'numpy' (C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy_init_.py)

How do I fix this?

I've tried to reinstall and check versions on the mentioned modules but everything seems to be in order.

1 Answer 1

1

You'll need to downgrade from the latest numpy version, which is causing the issue. So if you do:

pip install numpy==1.23.3

then it should work for you.

See also the discussion here - this issue has been fixed, but the latest version has not been released on PyPI yet.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.