Назад | Перейти на главную страницу

Невозможно добавить дино в приложение Heroku после, казалось бы, успешного push приложения

Недавно я запустил приложение на Heroku, используя git push heroku master и получил пару ошибок:

remote:            raise ValueError("Missing distribution spec", line)
remote:        ValueError: ('Missing distribution spec', '+ Python (2.7)')

Однако потом я получил

remote: -----> Compressing... done, 36.5MB
remote: -----> Launching... done, v5

предполагая, что приложение было успешно запущено.

К сожалению, если я попытаюсь получить доступ к странице, на которой размещено приложение, я получаю страницу с сообщением:

An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

Я проверил журналы, и в нем говорится, что есть ошибка, код которой H14 - приложение не связано с ней. Естественно, я пошел добавить дино, но Heroku не позволил мне добавить его вообще. Варианта «редактировать» вообще нет. Я проверил этот вопрос и обнаружил, что это не совсем похоже на мою ситуацию, поскольку, насколько мне известно, Heroku позволил мне запустить приложение, и поэтому я предположил, что указанные выше ошибки не были критическими. Что мне не хватает?

См. Ниже полный git push вывод.

Counting objects: 197, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (193/193), done.
Writing objects: 100% (197/197), 1.95 MiB | 390.00 KiB/s, done.
Total 197 (delta 14), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Stack changed, re-installing runtime
remote: -----> Installing runtime (python-2.7.9)
remote: -----> Installing dependencies with pip
remote:        Exception:
remote:        Traceback (most recent call last):
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
remote:            status = self.run(options, args)
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 262, in run
remote:            for req in parse_requirements(filename, finder=finder, options=options, session=session):
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1631, in parse_requirements
remote:            req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 172, in from_line
remote:            return cls(req, comes_from, url=url, prereleases=prereleases
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 70, in __init__
remote:            req = pkg_resources.Requirement.parse(req)
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/pkg_resources.py", line 2667, in parse
remote:            reqs = list(parse_requirements(s))
remote:          File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/pkg_resources.py", line 2593, in parse_requirements
remote:            raise ValueError("Missing distribution spec", line)
remote:        ValueError: ('Missing distribution spec', '+ Python (2.7)')
remote:        
remote:        Storing debug log for failure in /app/.pip/pip.log
remote: 
remote: -----> Preparing static assets
remote:        Collectstatic configuration error. To debug, run:
remote:        $ heroku run python ./manage.py collectstatic --noinput
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote: 
remote: -----> Compressing... done, 36.5MB
remote: -----> Launching... done, v5
remote:        https://firsttest.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/firsttest.git

У вас есть синтаксическая ошибка в вашем requirements.txt: линия

+ Python (2.7)

является недействительным. Если это должен быть комментарий, он должен начинаться с #.