Flask Веб-приложение на Heroku. Ошибка: Heroku не может найти файл Мои требования.txt - PullRequest
0 голосов
/ 15 апреля 2020

Я впервые установил git на свой компьютер, создал папку моего проекта со следующей структурой:

enter image description here

Здесь app.py - это Основной файл, который содержит импорт, такой как pandas и flask.

Это мои требования. Текст:

enter image description here

Тогда Я начал вставлять sh мой код в heroku и получил следующее:

(env) (base) aniketgaikwad@pop-os:~/data$ heroku git:remote -a covidtrackerindia
›   Warning: heroku update available from 7.39.0 to 7.39.2.
set git remote heroku to https://git.heroku.com/covidtrackerindia.git
(env) (base) aniketgaikwad@pop-os:~/data$ git push heroku master
Enumerating objects: 2758, done.
Counting objects: 100% (2758/2758), done.
Delta compression using up to 12 threads
Compressing objects: 100% (2707/2707), done.
Writing objects: 100% (2758/2758), 31.76 MiB | 488.00 KiB/s, done.
Total 2758 (delta 168), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: cp: cannot create regular file '/app/tmp/cache/.heroku/requirements.txt': No such file or directory
remote: -----> Installing python-3.7.6
remote: -----> Installing pip
remote: -----> Installing dependencies with Pipenv 2018.5.18…
remote:        Installing dependencies from Pipfile.lock (d977f2)…
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: 
remote: -----> Compressing...
remote:        Done: 93.6M
remote: -----> Launching...
remote:        Released v3
remote:        https://covidtrackerindia.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/covidtrackerindia.git
* [new branch]      master -> master

Когда я посмотрел журналы, я нашел это,

2020-04-15T15:16:33.332290+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2020-04-15T15:16:33.332291+00:00 app[web.1]: File "/app/app.py", line 3, in <module>
2020-04-15T15:16:33.332291+00:00 app[web.1]: import pandas as pd
2020-04-15T15:16:33.332291+00:00 app[web.1]: ModuleNotFoundError: No module named 'pandas'
2020-04-15T15:16:33.332299+00:00 app[web.1]: [2020-04-15 15:16:33 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-04-15T15:16:33.365475+00:00 app[web.1]: Traceback (most recent call last):
2020-04-15T15:16:33.365484+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 209, in run
2020-04-15T15:16:33.365886+00:00 app[web.1]: self.sleep()
2020-04-15T15:16:33.365934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 357, in sleep
2020-04-15T15:16:33.366157+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2020-04-15T15:16:33.366160+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2020-04-15T15:16:33.366333+00:00 app[web.1]: self.reap_workers()
2020-04-15T15:16:33.366336+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2020-04-15T15:16:33.366584+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2020-04-15T15:16:33.366688+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2020-04-15T15:16:33.366693+00:00 app[web.1]: 
2020-04-15T15:16:33.366694+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2020-04-15T15:16:33.366694+00:00 app[web.1]: 
2020-04-15T15:16:33.366696+00:00 app[web.1]: Traceback (most recent call last):
2020-04-15T15:16:33.366698+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2020-04-15T15:16:33.366821+00:00 app[web.1]: sys.exit(run())
2020-04-15T15:16:33.366827+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
2020-04-15T15:16:33.366958+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2020-04-15T15:16:33.366989+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 228, in run
2020-04-15T15:16:33.367153+00:00 app[web.1]: super().run()
2020-04-15T15:16:33.367176+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run
2020-04-15T15:16:33.367308+00:00 app[web.1]: Arbiter(self).run()
2020-04-15T15:16:33.367311+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 229, in run
2020-04-15T15:16:33.367475+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2020-04-15T15:16:33.367478+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 342, in halt
2020-04-15T15:16:33.367677+00:00 app[web.1]: self.stop()
2020-04-15T15:16:33.367681+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop
2020-04-15T15:16:33.367886+00:00 app[web.1]: time.sleep(0.1)
2020-04-15T15:16:33.367909+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2020-04-15T15:16:33.368116+00:00 app[web.1]: self.reap_workers()
2020-04-15T15:16:33.368121+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2020-04-15T15:16:33.368516+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2020-04-15T15:16:33.368603+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2020-04-15T15:16:53.102802+00:00 heroku[router]: at=error code=H10 desc="App crashed"  method=GET path="/" host=covidtrackerindia.herokuapp.com request_id=e83ed36f-d740-4762- b971-0ba1db009362 fwd="106.220.70.187" dyno= connect= service= status=503 bytes= protocol=https
2020-04-15T15:16:53.969065+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=covidtrackerindia.herokuapp.com request_id=bdf32777-2260-4347-a898-e4e03d8c1a2d fwd="106.220.70.187" dyno= connect= service= status=503 bytes= protocol=https
2020-04-15T15:18:45.039521+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=covidtrackerindia.herokuapp.com request_id=864f28ee-7fb4-46c9-8a28-3ab7f71ffc8f fwd="106.220.70.187" dyno= connect= service= status=503 bytes= protocol=https
2020-04-15T15:19:08.783607+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=covidtrackerindia.herokuapp.com request_id=cbcd31ab-20c7-45e5-ace5-fbb58131e798 fwd="106.220.70.187" dyno= connect= service= status=503 bytes= protocol=https

ПОЖАЛУЙСТА, ПОМОГИТЕ.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...