簡體   English   中英

Heroku 內部服務器錯誤(未找到 python 應用程序)flask

[英]Heroku Internal Server Error (no python application found) flask

我正在嘗試將 api (Python/Flask) 部署到 Heroku,我的代碼在 [Github][1] 上。

部署后,Heroku 說它成功了(綠色勾號。)但是當我按下視圖時,我會得到這個錯誤:

Internal Server Error

所以我檢查了日志,看看我發現了什么:

 no python application found, check your startup logs for errors

我應該如何解決這個問題?

從部署到錯誤的完整日志:

2020-01-22T15:24:36.310869+00:00 app[api]: Initial release by user ****
2020-01-22T15:24:36.310869+00:00 app[api]: Release v1 created by user ****
2020-01-22T15:24:36.442211+00:00 app[api]: Enable Logplex by user ****
2020-01-22T15:24:36.442211+00:00 app[api]: Release v2 created by user ****
2020-01-22T15:26:34.000000+00:00 app[api]: Build started by user ****
2020-01-22T15:26:35.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/1e44e623-1888-491e-8cef-7f1821489e00/activity/builds/76923301-a05e-44a6-9ae4-41eec1b98502
2020-01-22T15:38:46.000000+00:00 app[api]: Build started by user ****
2020-01-22T15:39:55.514758+00:00 app[api]: Release v3 created by user ****
2020-01-22T15:39:55.514758+00:00 app[api]: Deploy e89d2386 by user ****
2020-01-22T15:39:55.530781+00:00 app[api]: Scaled to web@1:Free by user ****
2020-01-22T15:39:59.715943+00:00 heroku[web.1]: Starting process with command `uwsgi uwsgi.ini`
2020-01-22T15:40:01.907084+00:00 app[web.1]: [uWSGI] getting INI configuration from uwsgi.ini
2020-01-22T15:40:01.907208+00:00 app[web.1]: *** Starting uWSGI 2.0.18 (64bit) on [Wed Jan 22 15:40:01 2020] ***
2020-01-22T15:40:01.907210+00:00 app[web.1]: compiled with version: 7.4.0 on 22 January 2020 15:39:04
2020-01-22T15:40:01.907213+00:00 app[web.1]: os: Linux-4.4.0-1057-aws #61+hf245703v20191104b1-Ubuntu SMP Mon Nov 4 15:32:25 UTC 2019
2020-01-22T15:40:01.907215+00:00 app[web.1]: nodename: 45156b67-91fa-4ed7-8f62-14e42dad2cc4
2020-01-22T15:40:01.907216+00:00 app[web.1]: machine: x86_64
2020-01-22T15:40:01.907217+00:00 app[web.1]: clock source: unix
2020-01-22T15:40:01.907219+00:00 app[web.1]: pcre jit disabled
2020-01-22T15:40:01.907220+00:00 app[web.1]: detected number of CPU cores: 8
2020-01-22T15:40:01.907222+00:00 app[web.1]: current working directory: /app
2020-01-22T15:40:01.907224+00:00 app[web.1]: detected binary path: /app/.heroku/python/bin/uwsgi
2020-01-22T15:40:01.907250+00:00 app[web.1]: your processes number limit is 256
2020-01-22T15:40:01.907251+00:00 app[web.1]: your memory page size is 4096 bytes
2020-01-22T15:40:01.907253+00:00 app[web.1]: detected max file descriptor number: 10000
2020-01-22T15:40:01.907256+00:00 app[web.1]: lock engine: pthread robust mutexes
2020-01-22T15:40:01.907432+00:00 app[web.1]: thunder lock: disabled (you can enable it with --thunder-lock)
2020-01-22T15:40:01.907923+00:00 app[web.1]: uwsgi socket 0 bound to TCP address :34068 fd 3
2020-01-22T15:40:01.907985+00:00 app[web.1]: Python version: 3.7.5 (default, Oct 17 2019, 21:38:12)  [GCC 7.4.0]
2020-01-22T15:40:01.941594+00:00 app[web.1]: *** Python threads support is disabled. You can enable it with --enable-threads ***
2020-01-22T15:40:01.941597+00:00 app[web.1]: Python main interpreter initialized at 0x55bab4cc2590
2020-01-22T15:40:01.941604+00:00 app[web.1]: your server socket listen backlog is limited to 100 connections
2020-01-22T15:40:01.941605+00:00 app[web.1]: your mercy for graceful operations on workers is 60 seconds
2020-01-22T15:40:01.941849+00:00 app[web.1]: mapped 145840 bytes (142 KB) for 1 cores
2020-01-22T15:40:01.941922+00:00 app[web.1]: *** Operational MODE: single process ***
2020-01-22T15:40:01.942368+00:00 app[web.1]: *** no app loaded. going in full dynamic mode ***
2020-01-22T15:40:01.942371+00:00 app[web.1]: *** uWSGI is running in multiple interpreter mode ***
2020-01-22T15:40:01.942372+00:00 app[web.1]: spawned uWSGI master process (pid: 4)
2020-01-22T15:40:01.942869+00:00 app[web.1]: spawned uWSGI worker 1 (pid: 8, cores: 1)
2020-01-22T15:40:03.507118+00:00 heroku[web.1]: State changed from starting to up
2020-01-22T15:40:05.000000+00:00 app[api]: Build succeeded
2020-01-22T15:41:28.237519+00:00 app[web.1]: --- no python application found, check your startup logs for errors ---
2020-01-22T15:41:28.237646+00:00 app[web.1]: {address space usage: 112455680 bytes/107MB} {rss usage: 13242368 bytes/12MB} [pid: 8|app: -1|req: -1/1] 10.12.200.233 () {56 vars in 1062 bytes} [Wed Jan 22 15:41:28 2020] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
2020-01-22T15:41:28.236755+00:00 heroku[router]: at=info method=GET path="/" host=m-api.herokuapp.com request_id=4bec15f1-91af-4e19-8366-c783a31c6851 fwd="104.237.239.137" dyno=web.1 connect=1ms service=1ms status=500 bytes=104 protocol=https
2020-01-22T15:41:29.368236+00:00 app[web.1]: --- no python application found, check your startup logs for errors ---
2020-01-22T15:41:29.368386+00:00 app[web.1]: {address space usage: 112455680 bytes/107MB} {rss usage: 13242368 bytes/12MB} [pid: 8|app: -1|req: -1/2] 10.15.161.126 () {52 vars in 945 bytes} [Wed Jan 22 15:41:29 2020] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

你的 uwsgi.ini 中有錯別字: modlue = app:app

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM