Numpy deployment error

I have an app that has been deployed for a while on streamlit with no issues:

Recently I received the error below out of nowhere. It works fine locally and I even changed my requirements.txt file use numpy 1.19.2, so I am not sure why it is still referencing 1.20.

Can someone please assist with this? The link to the repository is:

Thank you

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 v1.25.dev0 Manual

Hi @aburstyn9068

Thanks for the question, there also appears to be some quirks in the interdependencies of the libraries that may have overwritten the specified NumPy version to 1.20 instead of the specified 1.19.2, as a result the app would not load properly.

However, I’ve tried updating the library versions to the present ones in requirements.txt and the updated app now works.


Hope this helps!

Best regards,

I changed the requirements.txt in my github to what you mentioned and it works now. Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.