
実現したいこと
Streamlitのオンライン環境での正常な読み込み。
前提
Streamlitでコードを書いています。
オフライン環境では問題なく動くのですが、GithubにアップロードしてSteamlit Cloudで動かすとモジュールが見つからないとエラーが発生します。
同様のエラーが起きた事例ではrequirements.txtにモジュール名を書くと解決したとあったので試したのですが、やはり同様のエラーが起きます。
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 541, in _run_script exec(code, module.__dict__) File "/mount/src/pekamasu_pommed/pages/test.py", line 4, in <module> import plotly.graph_objs as go
該当のソースコード
python
1import streamlit as st 2import pandas as pd 3import plotly.graph_objs as go 4import streamlit_pandas as sp
requirements.txt
1pandas==1.5.3 2plotly==5.18.0 3python_dateutil==2.8.2 4streamlit==1.18.1 5streamlit_pandas==0.0.9
試したこと
requirements.txtにバージョンを追記したり、順番を変えてみてもplotlyとstereamlit_pandasでエラーが発生しました。
追記【2023/10/31】
pipreqsでrequirements.txtを生成、更新し直した。
Github上でファイルの更新が行われているかも確認した。





回答1件
あなたの回答
tips
プレビュー