Application stopped working, IPython error

I had to redeploy my app as it was put to sleep due to very low traffic. I’m just trying to see to get it up and running again. It used to work previously with no issues but now I get the following error message:

2022-09-02 10:11:55.524 Uncaught app exception

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 443, in _run_script

    exec(code, module.__dict__)

  File "/app/sentimentanalysisapp/main.py", line 28, in <module>

    import twitterFunctions as tf # custom functions file

  File "/app/sentimentanalysisapp/twitterFunctions.py", line 29, in <module>

    import IPython

ModuleNotFoundError: No module named 'IPython'

From what I gathered, it is because IPython is not in the requirements.txt but I did not have it in there previously so I don’t know what the issue is. I tried putting it in the requirements.txt file but that did not solve the issue.

Here is the project’s GitHub repo: GitHub - AlexanderVerheecke/SentimentAnalysisApp: Twitter sentiment analysis application through streamlit

I just tried it locally, and got the same error. After adding ipython to the requirements.txt and pip installing, it worked. Can you double-check that adding ipython doesn’t work?

1 Like

What are you doing to redeploy the app exactly? If everything else fails try deleting and recreating it.

It seems like I set the wrong IPython version in requirements.txt. It works now, thanks for the help.