tweepyを使って特定のキーワードをtweetしたユーザーのリストをstreamlitを使って表示したいのですが、デプロイしたところエラーがブラウザに表示されてしまいます。
恐らくtweepyのapiでエラーが発生してしまっていると思うのですが、対処法がわかりません。
大変恐縮ですが、対処方法をご存知の方ご教示いただけないでしょうか。
追記:
重要なことを記載忘れておりました。
こちら、ローカルでは問題なく実行できるのですが、streamlitにデプロイするとエラーが出る状態です。
エラー内容↓
AttributeError: 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.7/site-packages/streamlit/script_runner.py", line 379, in _run_script exec(code, module.__dict__) File "/app/tw/twitter", line 30, in <module> tweets = test() File "/app/tw/twitter.py", line 28, in test tweets = tweepy.Cursor(api.search,q=searchkey,lang='ja').items(item_num)
コードはこちらです。
def test(): tweets = tweepy.Cursor(api.search,q=searchkey,lang='ja').items(item_num) return tweets tweets = test()
何卒、よろしくお願い致します。
あなたの回答
tips
プレビュー