tarun kashyap
tarun kashyap

Reputation: 1

No Module Found Error: streamlit app cloud for streamlit-drawable-canvas

I am trying to publish my mnist model on streamlit app cloud, the code is working fine on localhost but i am getting error once I launch the app. I have the requirement.txt file but still facing the issue.

ModuleNotFoundError: 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/appuser/venv/lib/python3.10/site
    exec(code, module.__dict__)
File "/app/mnist/deploy/mnist_app1.py", line 1, in <module>
    from streamlit_drawable_canvas import st_canvas`

My requirement.txt file, I generated this using pip3 freeze > requirement.txt:

altair==5.0.1
attrs==23.1.0
blinker==1.6.2
cachetools==5.3.1
certifi==2023.5.7
charset-normalizer==3.2.0
click==8.1.4
decorator==5.1.1
filelock==3.12.2
gitdb==4.0.10
GitPython==3.1.31
idna==3.4
importlib-metadata==6.8.0
Jinja2==3.1.2
jsonschema==4.18.0
jsonschema-specifications==2023.6.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
mpmath==1.3.0
networkx==3.1
numpy==1.25.0
packaging==23.1
pandas==2.0.3
Pillow==9.5.0
protobuf==4.23.4
pyarrow==12.0.1
pydeck==0.8.1b0
Pygments==2.15.1
Pympler==1.0.1
python-dateutil==2.8.2
pytz==2023.3
pytz-deprecation-shim==0.1.0.post0
referencing==0.29.1
requests==2.31.0
rich==13.4.2
rpds-py==0.8.10
six==1.16.0
smmap==5.0.0
streamlit==1.24.1
streamlit-drawable-canvas==0.9.3
sympy==1.12
tenacity==8.2.2
toml==0.10.2
toolz==0.12.0
torch==2.0.1
tornado==6.3.2
typing_extensions==4.7.1
tzdata==2023.3
tzlocal==4.3.1
urllib3==2.0.3
validators==0.20.0
zipp==3.15.0

here i have also mentioned the streamlit-drawable-canvas library for which i am getting error

I have created a repo on github and linked my github account to streamlit.

Upvotes: 0

Views: 1058

Answers (2)

Hani Naji
Hani Naji

Reputation: 1

I run into the same problem with code on a local host. the streamlit-drawable-canvas is not installed. you need to install using the following command: pip install streamlit-drawable-canvas

Upvotes: 0

Caroline Frasca
Caroline Frasca

Reputation: 734

It looks like you may have created a requirement.txt file rather than requirements.txt, which would prevent Streamlit Community Cloud from installing your dependencies.

Upvotes: 0

Related Questions