! [удаленное отклонение] master -> master (pre-receive hook отклонено) ошибка: не удалось выполнить pu sh некоторые ссылки на 'https://git.heroku.com/stark-dawn-54447.git' - PullRequest
0 голосов
/ 06 августа 2020

Я новичок в Django / Python и пытаюсь развернуть свой первый проект на Heroku. Я получаю следующую ошибку и следую этому руководству до буквы: 'Django для начинающих' от Уильяма С. Винсента.

Когда я бегу: $ git pu sh heroku master

Получаю:

ошибка:! [удаленное отклонение] master -> master (pre-receive hook отклонено) ошибка: не удалось выполнить pu sh некоторые ссылки на 'https://git.heroku.com/stark-dawn-54447.git'

Я включил весь код, возвращенный ниже ...

Большое спасибо

-----> Python app detected
-----> Installing python-3.8.5
-----> Installing pip 9.0.2, setuptools 47.1.1 and wheel 0.34.2
-----> Installing dependencies with Pipenv 2018.5.18…
       Traceback (most recent call last):
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 27, in _enumerate_items
           yield next(non_metadata), next(non_metadata)
       StopIteration
       
       The above exception was the direct cause of the following exception:
       
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/project.py", line 438, in _parse_pipfile
           return contoml.loads(contents)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
           elements = parse_tokens(tokens)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
           return _parse_token_stream(TokenStream(tokens))
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 29, in _parse_token_stream
           elements, pending = toml_file_elements(token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 375, in toml_file_elements
           captured = capture_from(token_stream).find(one).or_find(file_entry_element).or_empty()
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
           element, pending_ts = finder(self._token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 372, in one
           c1 = capture_from(ts1).find(file_entry_element).and_find(toml_file_elements)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 109, in and_find
           return Capturer(self.pending_tokens, self.value()).find(finder)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
           element, pending_ts = finder(self._token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 375, in toml_file_elements
           captured = capture_from(token_stream).find(one).or_find(file_entry_element).or_empty()
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
           element, pending_ts = finder(self._token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 372, in one
           c1 = capture_from(ts1).find(file_entry_element).and_find(toml_file_elements)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
           element, pending_ts = finder(self._token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 364, in file_entry_element
           captured = capture_from(token_stream).find(table_header_element).\
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 79, in or_find
           return Capturer(self._token_stream).find(finder)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/recdesc.py", line 33, in find
           element, pending_ts = finder(self._token_stream)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/parser/parser.py", line 350, in table_body_element
           return TableElement(captured.value()), captured.pending_tokens
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/table.py", line 22, in __init__
           self._check_for_duplicate_keys()
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/table.py", line 25, in _check_for_duplicate_keys
           if len(set(self.keys())) < len(self.keys()):
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 37, in keys
           return tuple(key for (key, _) in self.items())
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 37, in <genexpr>
           return tuple(key for (key, _) in self.items())
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/patched/prettytoml/elements/abstracttable.py", line 30, in items
           for (key_i, key), (value_i, value) in self._enumerate_items():
       RuntimeError: generator raised StopIteration
       
       During handling of the above exception, another exception occurred:
       
       Traceback (most recent call last):
         File "/app/.heroku/python/bin/pipenv", line 11, in <module>
           sys.exit(cli())
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
           return self.main(*args, **kwargs)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 697, in main
           rv = self.invoke(ctx)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
           return _process_result(sub_ctx.command.invoke(sub_ctx))
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
           return ctx.invoke(self.callback, **ctx.params)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
           return callback(*args, **kwargs)
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/cli.py", line 385, in install
           do_install(
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/core.py", line 1785, in do_install
           pre = project.settings.get('allow_prereleases')
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/project.py", line 446, in settings
           return self.parsed_pipfile.get('pipenv', {})
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/project.py", line 392, in parsed_pipfile
           parsed = self._parse_pipfile(contents)
         File "/app/.heroku/python/lib/python3.8/site-packages/pipenv/project.py", line 441, in _parse_pipfile
           return toml.loads(contents)
         File "/tmp/build_4d226441/.heroku/python/lib/python3.8/site-packages/pipenv/vendor/toml.py", line 342, in loads
           raise TomlDecodeError("What? " + group +
       toml.TomlDecodeError: What? requires already exists?{'source': [{'name': 'pypi', 'url': 'https://pypi.org/simple', 'verify_ssl': True}], 'dev-packages': {}, 'packages': {'django': '==3.0.1'}, 'requires': {'python_version': '3.8'}}
 !     Push rejected, failed to compile Python app.
 !     Push failed

1 Ответ

0 голосов
/ 07 августа 2020

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

Чтобы решить эту проблему, вы можете обновить свою версию Pipenv с 2018.5.18 до текущей версии, которая 2020.6.2 из PyPI .

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