0

Feel like this is probably the easiest thing in the world to you guys but i cant uploade my django blog to heroku, iv tried everything i can think of, runtime.txt file with different python versions, tried doing it through heroku instead of through git but that doesnt work. Im at a loss and i could really use some help. thanks in advance!

ill paste in the error message down below

gitpod /workspace/Django-Blog/Blog (master) $ git push heroku master
Enumerating objects: 82, done.
Counting objects: 100% (82/82), done.
Delta compression using up to 16 threads
Compressing objects: 100% (77/77), done.
Writing objects: 100% (82/82), 26.92 KiB | 3.85 MiB/s, done.
Total 82 (delta 18), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-22 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-3.10.7
remote: -----> Installing pip 22.2.2, setuptools 63.4.3 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting asgiref==3.5.2
remote:          Downloading asgiref-3.5.2-py3-none-any.whl (22 kB)
remote:        Collecting backports.zoneinfo==0.2.1
remote:          Downloading backports.zoneinfo-0.2.1.tar.gz (74 kB)
remote:          Installing build dependencies: started
remote:          Installing build dependencies: finished with status 'done'
remote:          Getting requirements to build wheel: started
remote:          Getting requirements to build wheel: finished with status 'done'
remote:          Preparing metadata (pyproject.toml): started
remote:          Preparing metadata (pyproject.toml): finished with status 'done'
remote:        Collecting crispy-bootstrap5==0.7
remote:          Downloading crispy_bootstrap5-0.7-py3-none-any.whl (22 kB)
remote:        Collecting Django==4.1.2
remote:          Downloading Django-4.1.2-py3-none-any.whl (8.1 MB)
remote:        Collecting django-crispy-forms==1.14.0
remote:          Downloading django_crispy_forms-1.14.0-py3-none-any.whl (133 kB)
remote:        Collecting gunicorn==20.1.0
remote:          Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
remote:        Collecting sqlparse==0.4.3
remote:          Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
remote:        Collecting whitenoise==6.2.0
remote:          Downloading whitenoise-6.2.0-py3-none-any.whl (19 kB)
remote:        Building wheels for collected packages: backports.zoneinfo
remote:          Building wheel for backports.zoneinfo (pyproject.toml): started
remote:          Building wheel for backports.zoneinfo (pyproject.toml): finished with status 'error'
remote:          error: subprocess-exited-with-error
remote:          
remote:          × Building wheel for backports.zoneinfo (pyproject.toml) did not run successfully.
remote:          │ exit code: 1
remote:          ╰─> [43 lines of output]
remote:              /tmp/pip-build-env-vq7kudpt/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
remote:                warnings.warn(msg, warning_class)
remote:              running bdist_wheel
remote:              running build
remote:              running build_py
remote:              creating build
remote:              creating build/lib.linux-x86_64-cpython-310
remote:              creating build/lib.linux-x86_64-cpython-310/backports
remote:              copying src/backports/__init__.py -> build/lib.linux-x86_64-cpython-310/backports
remote:              creating build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/_common.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/__init__.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/_version.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              running egg_info
remote:              writing src/backports.zoneinfo.egg-info/PKG-INFO
remote:              writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
remote:              writing requirements to src/backports.zoneinfo.egg-info/requires.txt
remote:              writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
remote:              reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
remote:              reading manifest template 'MANIFEST.in'
remote:              warning: no files found matching '*.png' under directory 'docs'
remote:              warning: no files found matching '*.svg' under directory 'docs'
remote:              no previously-included directories found matching 'docs/_build'
remote:              no previously-included directories found matching 'docs/_output'
remote:              adding license file 'LICENSE'
remote:              adding license file 'licenses/LICENSE_APACHE'
remote:              writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
remote:              copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              copying src/backports/zoneinfo/py.typed -> build/lib.linux-x86_64-cpython-310/backports/zoneinfo
remote:              running build_ext
remote:              building 'backports.zoneinfo._czoneinfo' extension
remote:              creating build/temp.linux-x86_64-cpython-310
remote:              creating build/temp.linux-x86_64-cpython-310/lib
remote:              gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.10 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-cpython-310/lib/zoneinfo_module.o -std=c99
remote:              lib/zoneinfo_module.c: In function ‘zoneinfo_fromutc’:
remote:              lib/zoneinfo_module.c:600:19: error: ‘_PyLong_One’ undeclared (first use in this function); did you mean ‘_PyLong_New’?
remote:                600 |             one = _PyLong_One;
remote:                    |                   ^~~~~~~~~~~
remote:                    |                   _PyLong_New
remote:              lib/zoneinfo_module.c:600:19: note: each undeclared identifier is reported only once for each function it appears in
remote:              error: command '/usr/bin/gcc' failed with exit code 1
remote:              [end of output]
remote:          
remote:          note: This error originates from a subprocess, and is likely not a problem with pip.
remote:          ERROR: Failed building wheel for backports.zoneinfo
remote:        Failed to build backports.zoneinfo
remote:        ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
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: 1c5c93266a344776ae3e83f58e5a90f1a7cbdccb
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 1c5c93266a344776ae3e83f58e5a90f1a7cbdccb
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 django-app-codeinstitute.
remote: 
To https://git.heroku.com/django-app-codeinstitute.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/django-app-codeinstitute.git'
Erik
  • 1

0 Answers0