简体   繁体   English

Flask 部署到 heroku 错误

[英]Flask deploy to heroku errors

I when i try to open my website https://pomocnikprofesora.herokuapp.com/ its dont work.当我尝试打开我的网站https://pomocnikprofesora.herokuapp.com/ 时,它不起作用。 This is my logs I dont know what can i say more but i cant put this question without more normal text.这是我的日志,我不知道我还能说什么,但如果没有更多正常的文字,我无法提出这个问题。 Any advice and help will be great for me.任何建议和帮助对我来说都很棒。 Thanks谢谢

$ heroku logs --tail
 »   Warning: heroku update available from 7.37.0 to 7.47.3.
2020-11-30T16:12:03.048409+00:00 app[api]: Initial release by user rozplochowskipawel9@gmail.com
2020-11-30T16:12:03.048409+00:00 app[api]: Release v1 created by user rozplochowskipawel9@gmail.com
2020-11-30T16:12:03.170216+00:00 app[api]: Release v2 created by user rozplochowskipawel9@gmail.com
2020-11-30T16:12:03.170216+00:00 app[api]: Enable Logplex by user rozplochowskipawel9@gmail.com
2020-11-30T16:12:22.236825+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=fathomless-coast-67373.herokuapp.com request_id=49dbe3e9-8b50-49cc-94b0-9ec7fde34228 fwd="31.60.48.45" dyno= connect= service= status=502 bytes= protocol=https
2020-11-30T16:12:22.983607+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=fathomless-coast-67373.herokuapp.com request_id=4b30a4cb-d870-42eb-9834-b5aaa006c1b5 fwd="31.60.48.45" dyno= connect= service= status=502 bytes= protocol=https
2020-11-30T16:13:57.834416+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=pomoncikprofesora.herokuapp.com request_id=ca16ec59-2bf7-4741-a873-67096832462f fwd="31.60.48.45" dyno= connect= service= status=502 bytes= protocol=https
2020-11-30T16:16:16.950761+00:00 app[web.1]: Traceback (most recent call last):
2020-11-30T16:16:16.950764+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in run
2020-11-30T16:16:16.951127+00:00 app[web.1]: self.sleep()
2020-11-30T16:16:16.951128+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 357, in sleep
2020-11-30T16:16:16.951411+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2020-11-30T16:16:16.951412+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2020-11-30T16:16:16.951616+00:00 app[web.1]: self.reap_workers()
2020-11-30T16:16:16.951617+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 528, in reap_workers
2020-11-30T16:16:16.951902+00:00 app[web.1]: raise HaltServer(reason, self.APP_LOAD_ERROR)
2020-11-30T16:16:16.951941+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'App failed to load.' 4>
2020-11-30T16:16:16.951944+00:00 app[web.1]:
2020-11-30T16:16:16.951944+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2020-11-30T16:16:16.951945+00:00 app[web.1]:
2020-11-30T16:16:16.951945+00:00 app[web.1]: Traceback (most recent call last):
2020-11-30T16:16:16.951949+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
2020-11-30T16:16:16.952070+00:00 app[web.1]: sys.exit(run())
2020-11-30T16:16:16.952071+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
2020-11-30T16:16:16.952219+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2020-11-30T16:16:16.952220+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 228, in run
2020-11-30T16:16:16.952395+00:00 app[web.1]: super().run()
2020-11-30T16:16:16.952396+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
2020-11-30T16:16:16.952520+00:00 app[web.1]: Arbiter(self).run()
2020-11-30T16:16:16.952521+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 229, in run
2020-11-30T16:16:16.952689+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2020-11-30T16:16:16.952691+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 342, in halt
2020-11-30T16:16:16.952897+00:00 app[web.1]: self.stop()
2020-11-30T16:16:16.952898+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
2020-11-30T16:16:16.953149+00:00 app[web.1]: time.sleep(0.1)
2020-11-30T16:16:16.953150+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2020-11-30T16:16:16.953324+00:00 app[web.1]: self.reap_workers()
2020-11-30T16:16:16.953325+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 528, in reap_workers
2020-11-30T16:16:16.953633+00:00 app[web.1]: raise HaltServer(reason, self.APP_LOAD_ERROR)
2020-11-30T16:16:16.953634+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'App failed to load.' 4>
2020-11-30T16:16:17.052618+00:00 heroku[web.1]: Process exited with status 1
2020-11-30T16:16:17.117406+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-30T17:01:23.850624+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-30T17:01:30.144003+00:00 heroku[web.1]: Starting process with command `gunicorn app:PomocnikProfesora.py`
2020-11-30T17:01:33.283660+00:00 app[web.1]: [2020-11-30 17:01:33 +0000] [4] [INFO] Starting gunicorn 20.0.4
2020-11-30T17:01:33.291826+00:00 app[web.1]: [2020-11-30 17:01:33 +0000] [4] [INFO] Listening at: http://0.0.0.0:43889 (4)
2020-11-30T17:01:33.300878+00:00 app[web.1]: [2020-11-30 17:01:33 +0000] [10] [INFO] Booting worker with pid: 10
2020-11-30T17:01:33.318087+00:00 app[web.1]: [2020-11-30 17:01:33 +0000] [11] [INFO] Booting worker with pid: 11
2020-11-30T17:01:34.497407+00:00 app[web.1]: Failed to parse 'PomocnikProfesora.py' as an attribute name or function call.
2020-11-30T17:01:34.498343+00:00 app[web.1]: [2020-11-30 17:01:34 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-11-30T17:01:34.520370+00:00 app[web.1]: Failed to parse 'PomocnikProfesora.py' as an attribute name or function call.
2020-11-30T17:01:34.521180+00:00 app[web.1]: [2020-11-30 17:01:34 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-11-30T17:01:34.690436+00:00 app[web.1]: [2020-11-30 17:01:34 +0000] [4] [INFO] Shutting down: Master
2020-11-30T17:01:34.690611+00:00 app[web.1]: [2020-11-30 17:01:34 +0000] [4] [INFO] Reason: App failed to load.
2020-11-30T17:01:34.770227+00:00 heroku[web.1]: Process exited with status 4
2020-11-30T17:01:34.808969+00:00 heroku[web.1]: State changed from starting to crashed

As per the logs, your app crashed while loading:根据日志,您的应用在加载时崩溃:

2020-11-30T16:21:28.904773+00:00 heroku[router]: at=error code=H10 desc="App crashed"

The error also says that it is not able to parse the file PomocnikProfesora.py :该错误还表示它无法解析文件PomocnikProfesora.py

Failed to parse 'PomocnikProfesora.py' as an attribute name or function call
  1. Check if this file is executing properly or not检查此文件是否正确执行

  2. Also check how you have instantiated gunicorn.还要检查你是如何实例化 gunicorn 的。 If this is the entry point for your app, try this in the Procfile:如果这是您的应用程序的入口点,请在 Procfile 中尝试:

    web: gunicorn app:PomocnikProfesora web:gunicorn 应用程序:PomocnikProfesora

It looks like your app is crashing because of a failure to parse this file:由于无法解析此文件,您的应用似乎正在崩溃:

Failed to parse 'PomocnikProfesora.py' as an attribute name or function call

Try fixing that problem and resolving dependencies.尝试解决该问题并解决依赖关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM