I am facing an error in my app when it is deployed in streamlit cloud, however it works locally. When opening the app in codespace using the button on https://share.streamlit.io/ page, the .devcontainer.json use the image “mcr.microsoft.com/devcontainers/python:1-3.11-bullseye”, where my app breaks, however if I change to image python:1-3.11 the code works. Probably some dependency problem using the chromadb library in this smaller version of python bullseye, so I wish I could chose the python image used.
Good question, @lgabs!
I’m not too sure, but I’ve asked our devs, so hopefully, we should get an answer for you very shortly.
In the meantime, could you please share exactly what errors or buggy behaviors you ran into? Any specific stack traces or logs would help, in addition to the repo or app url.
Thanks for your patience.
Best,
Charly
Hi @lgabs
It could be a possible dependency issue where Chroma requires sqlite
>= 3.35.0 (🔍 Troubleshooting | Chroma).
Please also see this Streamlit app for a detailed walkthrough on using Chroma with Streamlit:
Hope this helps!
Thanks @dataprofessor and @Charly_Wargnier ! Indeed, it is about this chroma dependency with sqlite, while using langchain library for an app with streamlit. I managed to fix locally with installation of sqlite3-binary like the troubleshooting link, but did not work on cloud.
This app is from a private repo with limited permission I’ll check the demo @dataprofessor has linked above.
when not installing sqlite3-binary, the error is about the troubleshooting above from chroma, but when installing with this requirements.txt the problem changes to the one in the printscreen.
langchain
openai==0.28.0
chromadb
tiktoken==0.5.1
pandas==2.1.0
streamlit==1.26.0
streamlit-chat==0.1.1
pysqlite3-binary
Actually it worked and that is why you can see the other, unrelated problem. Now make sure your versions of langchain and chromadb are compatible and you will find the next one.
Thanks you all! I got it working with the help of the chroma troubleshooting instructions. To better show the solution, I’ve created this small public repo only with the relevant code, which makes use of chroma connection constructor directly (which I got from this tutorial), hope it can help others: repository (use-pysqlite3
branch) and the app.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.