I previously deployed an app on Streamlit Cloud that utilized chromadb
.
The app worked fine in the past. However, today I encountered a new error (as indicated in the title) and the app has stopped functioning.
I attempted to troubleshoot based on solutions from the Streamlit forum and performed the following steps sequentially:
- Updated the
requirements.txt
file by addingpysqlite3-binary
. - Added the following three lines of code at the top of
app.py
:
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
After rebooting my app, I discovered the new error:
ModuleNotFoundError: No module named 'pysqlite3'
Traceback:
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/docgpt-streamlit/app.py", line 2, in <module>
import pysqlite3
Subsequently, I tried adding pysqlite3
again to requirements.txt
, but the error persisted.
According to the logs from manage app, I observed that Streamlit did not perform a re-pip install action.
Could this be causing the pysqlite error? If so, how can I correctly enable the Streamlit app to automatically pip install due to my updated requirements.txt
?
pip3 install pysqlite3-binary
. I gotModuleNotFoundError: No module named 'pysqlite3._sqlite3'
. – Neuburger