ModuleNotFoundError plotly.express or plotly.graph_objects

I just started getting the following error. This app has been working or a few months now. Is plotly still available?

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.8/site-packages/streamlit/script_runner.py", line 379, in _run_script
    exec(code, module.__dict__)File "/app/streamlit-dcps-covid/web.py", line 2, in <module>
    import plotly.express as px, plotly.graph_objects as go

The code for this app is here - https://github.com/acedanger/streamlit-dcps-covid/blob/main/web.py

Hi @acedanger, welcome back!

I forked the repo and it launched from my account, so I’m not sure what to suggest other than to reboot the app. We’re not limiting what packages are available on Streamlit Cloud; if it can be installed from PyPI or conda, then it should work.

One thing I will recommend for this specific app is you’ve pinned Streamlit to 0.89, but versions of Streamlit > 1.1 have some memory enhancements that will make the app work even better on Streamlit Cloud. So you might consider that upgrade, if your code supports it.

Best,
Randy

Thanks @randyzwitch. I updated my dependencies and that appears to have resolved my problem.

1 Like

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 (most recent call last):
  File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 379, in _run_script
    exec(code, module.__dict__)
  File "/app/sat-vs-gpa/app.py", line 2, in <module>
    import SAT_vs_GPA as model
  File "/app/sat-vs-gpa/SAT_vs_GPA.py", line 3, in <module>
    from matplotlib import pyplot as plt

Link: https://share.streamlit.io/grace-hephzibah/sat-vs-gpa/main/app.py
Repo: GitHub - Grace-Hephzibah/SAT-vs-GPA: A simple linear regression model using OLS method

When I locally host it, it works perfectly well. I don’t know the problem when I host it. Please help !!!

Hi @Grace_Hephzibah -

Your app appears to be working to me, plots are showing up and picking a number for the SAT returns a predicted GPA.

Best,
Randy

Thanks. I got irritated when I tried hosting multiple times but I am positive that it did not work yesterday. Anyway, it is working now. Thanks

I’m running into the same issues. I have plotly in my dashboard and it worked fine locally, but when I tried to deploy it’s getting the error “ModuleNotFoundError”