Python初心者です。ローカルで作ったファイルをHerokuのサーバーにdeployしようとしています。
git push heroku master をすると以下のようにエラーが出ました。
bruch は確認したところ、masterになっていました。
バージョンが違うのかもしれない。と思って、requirements.txtも念のため新しく書き換えましたがだめでした。
どうしたらpushをrejectされるエラーを解決できるのでしょうか。。。
git push heroku master Enumerating objects: 48, done. Counting objects: 100% (48/48), done. Delta compression using up to 8 threads Compressing objects: 100% (43/43), done. Writing objects: 100% (48/48), 604.91 KiB | 15.92 MiB/s, done Total 48 (delta 14), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: -----> Python app detected remote: -----> Installing python-3.9.4 remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2 remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting aiodns==2.0.0 remote: Downloading aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB) remote: Collecting aiohttp==3.7.4.post0 remote: Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB) remote: Processing /home/ktietz/src/ci/alabaster_1611921544520/work remote: ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/ktietz/src/ci/alabaster_1611921544520/work' remote: remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 5b9d3a5d3e2d34a3a7457bbd4b88fbd7886cf11a remote: ! remote: ! We have detected that you have triggered a build from source code with version 5b9d3a5d3e2d34a3a7457bbd4b88fbd7886cf11a remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to pacific-tundra-19775. remote: To https://git.heroku.com/pacific-tundra-19775.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/pacific-tundra-19775.git'
herokuのログ -----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app -----> Python app detected -----> Installing python-3.9.4 -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2 -----> Installing SQLite3 -----> Installing requirements with pip Collecting aiodns==2.0.0 Downloading aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB) Collecting aiohttp==3.7.4.post0 Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB) Processing /home/ktietz/src/ci/alabaster_1611921544520/work ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/ktietz/src/ci/alabaster_1611921544520/work' ! Push rejected, failed to compile Python app. ! Push failed コード ```
あなたの回答
tips
プレビュー