Noticed this in April 2024. I think it has to do something with gensim package and dependencies. And that something was updated on the web but I am unsure where to look to confirm this and what to do next. I would appreciate any assistance - thanks.
Error Message: ```
File “/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 534, in _run_script
exec(code, module.dict)File “/mount/src/flavor_space/app.py”, line 5, in
import gensimFile “/home/adminuser/venv/lib/python3.11/site-packages/gensim/init.py”, line 11, in
from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File “/home/adminuser/venv/lib/python3.11/site-packages/gensim/corpora/init.py”, line 6, in
from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File “/home/adminuser/venv/lib/python3.11/site-packages/gensim/corpora/indexedcorpus.py”, line 14, in
from gensim import interfaces, utilsFile “/home/adminuser/venv/lib/python3.11/site-packages/gensim/interfaces.py”, line 19, in
from gensim import utils, matutilsFile “/home/adminuser/venv/lib/python3.11/site-packages/gensim/matutils.py”, line 20, in
from scipy.linalg import get_blas_funcs, triu
Please provide the specific error message from Streamlit Cloud under your deployed app’s ‘Manage app’ section.
No version of 1.28.1 is ever deployed in Streamlit. You can check here: Streamlit Changelog
I would suggest you correct the Streamlit version 1.28.0 in your requirements.txt file.
Have you selected Python version 3.10 for this app during deployment under the “Advance settings” modal?
After visiting your app, I’ve observed another error on both the pages, cluster browser and visualize flavor space. Both of the pages throw the same error .
KeyError: This app has encountered an error.
File "/mount/src/flavor_space/pages/cluster_browser.py", line 9, in <module>
projection_df=st.session_state["projection_df"]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/state/session_state_proxy.py", line 90, in __getitem__
return get_session_state()[key]
~~~~~~~~~~~~~~~~~~~^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/state/safe_session_state.py", line 89, in __getitem__
return self._state[key]
~~~~~~~~~~~^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/state/session_state.py", line 396, in __getitem__
raise KeyError(_missing_key_error_message(key))
Please look into this one as well where I guess you haven’t initialized values for the st.session_state[key] variables. Have a look here: Session State
Here’s the full error message when selecting ‘manage app’"
ImportError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.__dict__)File "/mount/src/flavor_space/app.py", line 5, in <module>
import gensimFile "/home/adminuser/venv/lib/python3.11/site-packages/gensim/__init__.py", line 11, in <module>
from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/gensim/corpora/__init__.py", line 6, in <module>
from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/gensim/corpora/indexedcorpus.py", line 14, in <module>
from gensim import interfaces, utilsFile "/home/adminuser/venv/lib/python3.11/site-packages/gensim/interfaces.py", line 19, in <module>
from gensim import utils, matutilsFile "/home/adminuser/venv/lib/python3.11/site-packages/gensim/matutils.py", line 20, in <module>
from scipy.linalg import get_blas_funcs, triu
Weird. I corrected the version to 1.28.0.
Noted. I haven’t changed anything with Advance settings yet. I will try this next.
The main page ‘app.py’ initializes the variables and loads it into the cluster browser and visualize flavor space pages. I believe these errors are tied to the start up of the app itself.
So I updated the requirements.txt and still see the same error. The app was running online fine since February 2024 when all the sudden in the past 2 weeks it started showing the error. But it still works works fine locally. The import error makes me think it has to do with gensim package and dependencies specifically. Any ideas?
Ok I resolved the issue! The issue was dependency-related. gensim needed scipy so I added it as a line in requirements.txt. I got thrown off because this dependency issue wasn’t there before and all the sudden it came up (app stopped working even though I did not push any code changes). I don’t know how to explain what happened but at least there was a fix. Thanks for your help!
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.