AttributeError: module ‘numpy’ has no attribute ‘bool’. np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: NumPy 1.20.0 Release Notes — NumPy v2.0.dev0 Manual
But the app works well in my local computer.
I tried to downgrade numpy version(from 1.24 to 1.19) like I saw in forums but the error persists.
Hi Goyo,
I don’t know how
The error message says the culprit is here:
File "/mount/src/data-vision/app.py", line 466, in <module>
fig_na = visualizeNaValues(df)File "/mount/src/data-vision/app.py", line 170, in visualizeNaValues
fig = px.imshow(df.isnull(), aspect='auto')
But It doesn’t indicate me what to do. (Sorry I’m a beginner)
After looking at the error message again, the issue seems to be incompatibility between Plotly and NumPy libraries. Try updating the plotly version in your requirements.txt file to a more recent one. (Maybe the app works correctly in your local directory because there you already have a more recently version.) Hope this helps!
Hi,
I updated all of them, streamlit, pandas, numpy, plotly.
Got the requirement from my local (from which its working well)
But still, on the cloud, it doesn’t work.
When I remove px.imshow (in the visualizeNaValues()) it’s working though, but I don’t know why, and if I could replace px.imshow by something else who does the job well