質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

解決済

1回答

1410閲覧

Herokuでのapplication errorで困っています

piyopiyo1234

総合スコア5

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2020/01/13 14:51

編集2020/01/15 08:03

前提・実現したいこと

pythonで'Hello, Heroku!'と表示させたいです。
デプロイには成功しましたが、ページを開くとapplication errorになってしまい、行き詰っています。logではH10エラーが出ていました。

発生している問題・エラーメッセージ

log

12020-01-13T05:19:27.608709+00:00 app[api]: Enable Logplex by user XXX@gmail.com 22020-01-13T05:19:27.608709+00:00 app[api]: Release v2 created by user XXX@gmail.com 32020-01-13T05:19:27.220948+00:00 app[api]: Release v1 created by user XXX@gmail.com 42020-01-13T05:19:27.220948+00:00 app[api]: Initial release by user XXX@gmail.com 52020-01-13T05:21:54.332960+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=08e028e4-c895-4dc9-926e-eeaac281dfa3 fwd="14.13.108.129" dyno= connect= service= status=502 bytes= protocol=https 62020-01-13T05:24:39.000000+00:00 app[api]: Build started by user XXX@gmail.com 72020-01-13T05:25:08.467783+00:00 app[api]: Scaled to web@1:Free by user XXX@gmail.com 82020-01-13T05:25:08.404489+00:00 app[api]: Deploy 45575020 by user XXX@gmail.com 92020-01-13T05:25:08.404489+00:00 app[api]: Release v3 created by user XXX@gmail.com 102020-01-13T05:25:11.826323+00:00 heroku[web.1]: Starting process with command `python:app.py` 112020-01-13T05:25:14.120892+00:00 heroku[web.1]: State changed from starting to crashed 122020-01-13T05:25:14.124137+00:00 heroku[web.1]: State changed from crashed to starting 132020-01-13T05:25:14.108221+00:00 heroku[web.1]: Process exited with status 127 142020-01-13T05:25:14.019831+00:00 app[web.1]: bash: python:app.py: command not found 152020-01-13T05:25:17.574659+00:00 heroku[web.1]: Starting process with command `python:app.py` 162020-01-13T05:25:17.000000+00:00 app[api]: Build succeeded 172020-01-13T05:25:19.257877+00:00 heroku[web.1]: State changed from starting to crashed 182020-01-13T05:25:19.238326+00:00 heroku[web.1]: Process exited with status 127 192020-01-13T05:25:19.188671+00:00 app[web.1]: bash: python:app.py: command not found 202020-01-13T05:25:31.686489+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=215e7a72-a3b9-4021-a97a-04d2dbbfaed0 fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 212020-01-13T05:25:32.530326+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=floating-chamber-08908.herokuapp.com request_id=596c9347-f59f-4b0c-9e7f-0469db4ca565 fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 222020-01-13T06:04:38.277965+00:00 heroku[web.1]: State changed from crashed to starting 232020-01-13T06:04:42.256866+00:00 heroku[web.1]: Starting process with command `python:app.py` 242020-01-13T06:04:44.753237+00:00 heroku[web.1]: State changed from starting to crashed 252020-01-13T06:04:44.728360+00:00 heroku[web.1]: Process exited with status 127 262020-01-13T06:04:44.681021+00:00 app[web.1]: bash: python:app.py: command not found 272020-01-13T06:47:48.181883+00:00 heroku[web.1]: State changed from crashed to starting 282020-01-13T06:47:51.680529+00:00 heroku[web.1]: Starting process with command `python:app.py` 292020-01-13T06:47:53.347871+00:00 heroku[web.1]: Process exited with status 127 302020-01-13T06:47:53.362002+00:00 heroku[web.1]: State changed from starting to crashed 312020-01-13T06:47:53.299238+00:00 app[web.1]: bash: python:app.py: command not found 322020-01-13T08:18:34.758437+00:00 heroku[web.1]: State changed from crashed to starting 332020-01-13T08:18:38.290592+00:00 heroku[web.1]: Starting process with command `python:app.py` 342020-01-13T08:18:39.792820+00:00 heroku[web.1]: State changed from starting to crashed 352020-01-13T08:18:39.733966+00:00 app[web.1]: bash: python:app.py: command not found 362020-01-13T08:18:39.775849+00:00 heroku[web.1]: Process exited with status 127 372020-01-13T10:58:41.184266+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=fef0c95c-acc2-4ac4-b47b-a597e4189483 fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 382020-01-13T10:58:41.866324+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=floating-chamber-08908.herokuapp.com request_id=ba84b2ed-065a-4665-9ebc-1652d0e20123 fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 392020-01-13T11:21:37.333431+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=c41fbaf5-c332-428d-a4df-91b0d717f16e fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 402020-01-13T11:21:47.065395+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=fe3ee9da-2678-4479-85bc-885d985a4bcf fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 412020-01-13T11:23:05.000000+00:00 app[api]: Build started by user XXX@gmail.com 422020-01-13T11:23:38.935595+00:00 heroku[web.1]: State changed from crashed to starting 432020-01-13T11:23:38.753502+00:00 app[api]: Deploy 95ea518e by user XXX@gmail.com 442020-01-13T11:23:38.753502+00:00 app[api]: Release v4 created by user XXX@gmail.com 452020-01-13T11:23:43.320197+00:00 heroku[web.1]: Starting process with command `python app.py` 462020-01-13T11:23:45.579269+00:00 heroku[web.1]: State changed from starting to crashed 472020-01-13T11:23:45.583394+00:00 heroku[web.1]: State changed from crashed to starting 482020-01-13T11:23:45.512668+00:00 app[web.1]: Hello Heroku! 492020-01-13T11:23:45.565110+00:00 heroku[web.1]: Process exited with status 0 502020-01-13T11:23:47.000000+00:00 app[api]: Build succeeded 512020-01-13T11:23:49.526160+00:00 heroku[web.1]: Starting process with command `python app.py` 522020-01-13T11:23:51.569643+00:00 heroku[web.1]: State changed from starting to crashed 532020-01-13T11:23:51.491411+00:00 app[web.1]: Hello Heroku! 542020-01-13T11:23:51.553923+00:00 heroku[web.1]: Process exited with status 0 552020-01-13T12:00:48.902939+00:00 heroku[web.1]: State changed from crashed to starting 562020-01-13T12:00:53.321532+00:00 heroku[web.1]: Starting process with command `python app.py` 572020-01-13T12:00:55.800022+00:00 heroku[web.1]: State changed from starting to crashed 582020-01-13T12:00:55.786630+00:00 heroku[web.1]: Process exited with status 0 592020-01-13T12:00:55.698704+00:00 app[web.1]: Hello Heroku! 602020-01-13T13:07:24.446869+00:00 heroku[web.1]: State changed from crashed to starting 612020-01-13T13:07:28.961451+00:00 heroku[web.1]: Starting process with command `python app.py` 622020-01-13T13:07:31.761429+00:00 heroku[web.1]: State changed from starting to crashed 632020-01-13T13:07:31.743665+00:00 heroku[web.1]: Process exited with status 0 642020-01-13T13:07:31.641870+00:00 app[web.1]: Hello Heroku! 652020-01-13T13:28:16.539308+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=51edd708-35ab-4c79-9dce-e066d5047595 fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 662020-01-13T13:29:33.211855+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=85752f9b-9ef1-4547-bfca-ee6beba17e5f fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https 672020-01-13T13:30:38.970908+00:00 heroku[web.1]: State changed from crashed to starting 682020-01-13T13:30:43.943123+00:00 heroku[web.1]: Starting process with command `python app.py` 692020-01-13T13:30:46.626893+00:00 heroku[web.1]: State changed from starting to crashed 702020-01-13T13:30:46.630629+00:00 heroku[web.1]: State changed from crashed to starting 712020-01-13T13:30:46.552282+00:00 app[web.1]: Hello Heroku! 722020-01-13T13:30:46.610464+00:00 heroku[web.1]: Process exited with status 0 732020-01-13T13:30:50.666567+00:00 heroku[web.1]: Starting process with command `python app.py` 742020-01-13T13:30:52.790497+00:00 heroku[web.1]: State changed from starting to crashed 752020-01-13T13:30:52.770341+00:00 heroku[web.1]: Process exited with status 0 762020-01-13T13:30:52.721807+00:00 app[web.1]: Hello Heroku! 772020-01-13T13:31:16.546825+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=floating-chamber-08908.herokuapp.com request_id=1faaa268-54e3-4a97-93a3-ddaf125c215a fwd="14.13.108.129" dyno= connect= service= status=503 bytes= protocol=https

###現状のコード
app.py

print('Hello Heroku!')

Procfile

web: python app.py

requirements.txt

certifi==2019.11.28 chardet==3.0.4 Click==7.0 Flask==1.1.1 idna==2.8 itsdangerous==1.1.0 Jinja2==2.10.3 MarkupSafe==1.1.1 requests==2.22.0 urllib3==1.25.7 virtualenv==16.7.9 Werkzeug==0.16.0

runtime.txt

python-3.8.1

###アプリ構造
.git
myenv
app.py
Procfile
requirements.txt
runtime.txt

試したこと

Herokuの再起動
コードの見直し

補足情報(FW/ツールのバージョンなど)

Windows10
Python3.8.1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2020/01/13 15:29

2020-01-13T05:21:54.332960+00:00 heroku[router]: at=info code=H81
yuokada

2020/01/14 16:44

pythonのスクリプトも質問に追加出来ませんか?
piyopiyo1234

2020/01/15 08:10

スクリプト追加いたしました。
guest

回答1

0

ベストアンサー

そのスクリプトでは全く動かないと思うので公式のチュートリアルなどを参考にHello Worldを実装した方が良いと思います。

投稿2020/01/15 12:50

編集2020/01/15 16:03
yuokada

総合スコア550

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

piyopiyo1234

2020/01/17 21:19

回答ありがとうございました。 参考に実装してみます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問