Error related to using plotly

Dear all,

I am new to streamlit and trying to delpoy my first app. The app perfectly works on python , however, when I try to deploy it , it return the following error :

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "/mount/src/hello/App.py", line 2, in <module>
    import plotly.express as px


I am not sure if it is related to dependencies or how to fix it. 

Thank you 

Hey @Nasserbadra,

Thanks for sharing your question. Please update your post to include the full error message and a link to your GitHub repo (it looks like you probably need to add plotly to your requirements file, although I can’t say for sure without looking at your code).

Hey Caroline

Thank you for your reply

Following is the link to my github:

Also , full error msg is as follows:

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/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)File "/mount/src/hello/App.py", line 2, in <module>
    import plotly.express as

It looks like you’re missing a requirements.txt file. Check out our docs which cover how to create one.

Many thanks. Will read it carefully and revert if the need arise

Hi again Caro

It worked well … thank you so much

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.