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?
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.