My Streamlit app was working fine a few days back, but now it is throwing a module not found error(even though the file is present on github)

Github url: GitHub - adityank11/AdityaAnimeRecommendation at master
I tried deleting and re-deploying my app, but that also didn’t work.

Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/adityaanimerecommendation/app.py", line 26, in <module>
    animes = pickle.load(open('anime_list.pkl','rb'))
ModuleNotFoundError: No module named 'pandas.core.indexes.numeric'
2023-04-09 05:56:13.306 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/adityaanimerecommendation/app.py", line 26, in <module>
    animes = pickle.load(open('anime_list.pkl','rb'))
ModuleNotFoundError: No module named 'pandas.core.indexes.numeric'

The pickled file was probably made with an older version of pandas, so i would try to add this to your requirements.txt file:

pandas<2
1 Like

Thanks, that solved the issue when I changed the pandas version to 1.5.0 in requirements.txt file.

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