Search code examples
pythondjangoherokuwagtail

Heroku errors when upgrading Wagtail CMS


I'm attempting to update a very out-of-date Wagtail-based website that is hosted on Heroku. I'm upgrading from Wagtail 2.13 to 2.14. The upgrade goes fine on my local machine, but when pushing the upgrade to Heroku, and I'm struggling to interpret the errors:

remote: -----> Requirements file has been changed, clearing cached dependencies
remote: -----> Installing python-3.8.7
remote: -----> Installing pip 23.3.2, setuptools 68.2.2 and wheel 0.42.0
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting anyascii==0.1.7 (from -r requirements.txt (line 1))
remote:          Downloading anyascii-0.1.7-py3-none-any.whl.metadata (1.6 kB)
remote:        Collecting asgiref==3.3.1 (from -r requirements.txt (line 2))
remote:          Downloading asgiref-3.3.1-py3-none-any.whl.metadata (8.9 kB)
remote:        Collecting beautifulsoup4==4.8.2 (from -r requirements.txt (line 3))
remote:          Downloading beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
remote:        Collecting boto3==1.17.15 (from -r requirements.txt (line 4))
remote:          Downloading boto3-1.17.15-py2.py3-none-any.whl.metadata (6.0 kB)
remote:        Collecting botocore==1.20.15 (from -r requirements.txt (line 5))
remote:          Downloading botocore-1.20.15-py2.py3-none-any.whl.metadata (5.3 kB)
remote:        Collecting certifi==2020.12.5 (from -r requirements.txt (line 6))
remote:          Downloading certifi-2020.12.5-py2.py3-none-any.whl.metadata (3.0 kB)
remote:        Collecting chardet==4.0.0 (from -r requirements.txt (line 7))
remote:          Downloading chardet-4.0.0-py2.py3-none-any.whl.metadata (3.5 kB)
remote:        Collecting dj-database-url==0.5.0 (from -r requirements.txt (line 8))
remote:          Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
remote:        Collecting dj-static==0.0.6 (from -r requirements.txt (line 9))
remote:          Downloading dj-static-0.0.6.tar.gz (3.4 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting Django==3.1.6 (from -r requirements.txt (line 10))
remote:          Downloading Django-3.1.6-py3-none-any.whl.metadata (3.7 kB)
remote:        Collecting django-filter==2.4.0 (from -r requirements.txt (line 11))
remote:          Downloading django_filter-2.4.0-py3-none-any.whl.metadata (4.1 kB)
remote:        Collecting django-modelcluster<6.0,>=5.2 (from -r requirements.txt (line 12))
remote:          Downloading django_modelcluster-5.3-py2.py3-none-any.whl.metadata (6.4 kB)
remote:        Collecting django-storages==1.11.1 (from -r requirements.txt (line 13))
remote:          Downloading django_storages-1.11.1-py3-none-any.whl.metadata (49 kB)
remote:        Collecting django-taggit==1.3.0 (from -r requirements.txt (line 14))
remote:          Downloading django_taggit-1.3.0-py3-none-any.whl (45 kB)
remote:        ERROR: Ignored the following versions that require a different python version: 5.0 Requires-Python >=3.10; 5.0.1 Requires-Python >=3.10; 5.0.2 Requires-Python >=3.10; 5.0a1 Requires-Python >=3.10; 5.0b1 Requires-Python >=3.10; 5.0rc1 Requires-Python >=3.10
remote:        ERROR: Could not find a version that satisfies the requirement django-toolbelt==0.0.1 (from versions: none)
remote:        ERROR: No matching distribution found for django-toolbelt==0.0.1
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed

Looks like 2 (?) errors here.

  1. One of the packages (would this be the package above, django_taggit, or the package below the error message?) needs a higher version, 3.10. I'm not sure if I can do this, as Wagtail 2.14 only supports up to Python 3.9.
  2. The package django-toolbelt==0.0.1 is missing from pypi.org (or at least I assume that is the case, I can't find it there. Please correct me if I'm misunderstanding the error here). Given that I'm not sure what django-toolbelt does, I'm not sure how to proceed from here.

I'd really appreciate any help as to whether I'm understanding these errors correctly, and how to proceed with fixing them.


Solution

  • It appears that django-toolbelt has been mysteriously pulled from PyPI, but according to the last available archive of it:

    This is a simple package that simply requires the following packages:

    • django
    • psycopg2
    • gunicorn
    • dj-database-url
    • dj-static

    So, you should hopefully be able to get back on track by adding whichever of those packages isn't already listed in your requirements file, and removing django-toolbelt.

    It looks to me that the django-taggit error has resolved itself by selecting 1.3.0 as the version to install - I think the message about ignoring version 5.0 is only informational (although it's surprising that it's shown up as an error).