Trouble using pickle load

I’m having a trouble deploying my app to the community cloud even though it works locally on my computer. The solution I found was to match pandas version <2. I tried 1.5.0, 1.5.2, and 1.5.3 but none of them solves the issue. Any other ideas?

  1. app: https://superresolutionmicroscopy-viz.streamlit.app/
  2. repo: GitHub - mesut-unal/super_resolution_microscopy_viz
  3. python = 3.9
    streamlit==1.16.0
  4. error message:
/home/appuser/venv/lib/python3.9/site-packages/scipy/__init__.py:155: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.2

  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"

2023-11-28 16:09:40.243 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/super_resolution_microscopy_viz/streamlit_app.py", line 161, in <module>

    main()

  File "/app/super_resolution_microscopy_viz/streamlit_app.py", line 70, in main

    loaded_data[ff] = viz.load_pickle(full_path)

  File "/app/super_resolution_microscopy_viz/viz_functions.py", line 25, in load_pickle

    ffile = pickle.load(pfile)

ModuleNotFoundError: No module named 'pandas.core.indexes.numeric'

Can you try this suggestion python - ModuleNotFoundError: No module named 'pandas.core.indexes.numeric' using Metaflow - Stack Overflow?

import pandas as pd

df = pd.read_pickle("file.pkl")

I definitely overlooked at this. Now it works. Thank you

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