前提・実現したいこと
現在、slackbotをローカル上で動作させるために作成したpythonファイル(run.py)をpyinstallerで実行ファイル化(run.exe)し、タスクスケジューラでPC起動時にbotが起動するようにしたい。
発生している問題・エラーメッセージ
Traceback (most recent call last): File "run.py", line 16, in <module> File "run.py", line 11, in main File "slackbot\bot.py", line 27, in __init__ File "slackbot\slackclient.py", line 43, in __init__ File "slackbot\slackclient.py", line 48, in rtm_connect File "slackbot\slackclient.py", line 72, in parse_slack_login_data File "websocket\_core.py", line 487, in create_connection File "websocket\_core.py", line 211, in connect File "websocket\_http.py", line 77, in connect File "websocket\_http.py", line 182, in _ssl_socket File "websocket\_http.py", line 138, in _wrap_sni_socket TypeError: cafile, capath and cadata cannot be all omitted [4396] Failed to execute script run
コンソール上では問題なく動作しているため、該当ファイル(run.py)の内容を記載いたします。
python
1from slackbot.bot import Bot 2 3 4def main(): 5 bot = Bot() 6 bot.run() 7 8if __name__ == "__main__": 9 print('start slackbot') 10 main() 11
試したこと
•pythonのバージョン変更(現在python 3.6.4)
•不必要なライブラリの削除
•cacert.pemファイルを可能性のありそうな配置へ移動(いろいろな階層に配置してみた)
•Googleで検索
以下、参照したサイトの一部
https://t.co/cNUPDXn73R?amp=1
https://github.com/slackapi/python-slack-sdk/issues/289
https://github.com/scrapinghub/slackbot/issues/133
補足情報(FW/ツールのバージョンなど)
python3.6.4
pyinstaller==4.3
pyinstaller-hooks-contrib==2021.1
requests==2.18.4
slackbot==1.0.0
slacker==0.14.0
websocket-client==0.44.0
run.specファイルはいじってません
あなたの回答
tips
プレビュー