Python-Heroku - aiohttp 3.7.3 has requirement chardet<4.0,>=2.0, but you'll have chardet 4.0.0 which is incompatible

Viewed 911

I have just started with git and heroku and I would like to have my files be online on heroku 24/7 but while uploading the file to heroku(git push heroku master) this is showing up

aiohttp 3.7.3 has requirement chardet<4.0,>=2.0, but you'll have chardet 4.0.0 which is incompatible.

I really think this is a python version problem so when I tried using a runtime.txt and settings the python version to one of the supporting ones on https://devcenter.heroku.com/articles/python-support#supported-runtimes this page, Still it doesn't work and show's

Requested runtime (python=3.7.9) is not available for this stack (heroku-20).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support

I am using git for the first time so not very good with it. I am working on just one branch called master and I type first

git add .

then

git commit -am "tej"

then

git push heroku master

And No I am not working of github repo's.

1 Answers

I had the same issue but managed to fix it by specifying the version of chardet in requirements.txt as 3.0.4

chardet==3.0.4

and then simply run

pip install -r requirements.txt

and everything will work out just fine.


Note that you'll also get that error if you're using in your requirements.txt the following version of chardet

chardet==4.0.0

enter image description here

Related