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
Again, Thank you!
Hello there 👋🏻
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.