在本機檔能正常開啟
logs 出現下面這個錯誤
2022-03-28T08:54:29.352079+00:00 app[web.1]: [2022-03-28 08:54:29,351] ERROR in app: Exception on / [GET]
2022-03-28T08:54:29.352108+00:00 app[web.1]: Traceback (most recent call last):
2022-03-28T08:54:29.352109+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
2022-03-28T08:54:29.352109+00:00 app[web.1]: response = self.full_dispatch_request()
2022-03-28T08:54:29.352110+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request
2022-03-28T08:54:29.352110+00:00 app[web.1]: rv = self.handle_user_exception(e)
2022-03-28T08:54:29.352111+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
2022-03-28T08:54:29.352111+00:00 app[web.1]: rv = self.dispatch_request()
2022-03-28T08:54:29.352111+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
2022-03-28T08:54:29.352111+00:00 app[web.1]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
2022-03-28T08:54:29.352112+00:00 app[web.1]: File "/app/app.py", line 63, in home
2022-03-28T08:54:29.352112+00:00 app[web.1]: print(session["輸出檔名"])
2022-03-28T08:54:29.352112+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/flask/sessions.py", line 79, in getitem
2022-03-28T08:54:29.352112+00:00 app[web.1]: return super().getitem(key)
2022-03-28T08:54:29.352113+00:00 app[web.1]: KeyError: '輸出檔名'
請問該怎麼排除
H10 是程式碼有錯,把錯誤訊息印出來看看吧