My app requires using the python module âextract-msgâ. In particular, I am using the extract_msg.message_base.MessageBase function. I have included in my requirements.txt file âextract-msg==0.42.1â and my log when I deploy on Streamlit Cloud shows that âextract_msg-0.42.1-py2.py3-none-any.whlâ was downloaded. However, when I tried to run the MessageBase function, it shows error AttributeError: module âextract_msgâ has no attribute âmessage_baseâ.
When I run the app locally, the python module âextract-msgâ is working fine and there are no errors.
One possibility is that the extract-msg library might have dependencies that are installed on your local machine but not on your deployed app. Check if there are any implicit dependencies you might be missing in your requirements.txt.
You can create a venv (virtual environment) in your local app then install the requirements in there and try running the app locally to see if it runs.
The error message is correct, there is indeed no attribute message_base in this version.
Probably you are using a different version of extract_msg on your local system.
Hmm, im using version 0.41.5. But, I have updated my requirements.txt file to match the extract-msg version used in my local machine. But, I am still facing the same error in the deployed app.
It is very weird because the first time I deployed the app on streamlit cloud, there were no issues. And then because of inactivity, the deployment was paused. When I re-deployed, i am getting the error. Any ideas on what I should do?