streamlink: urllib3 (1.25.1) or chardet (3.0.4) doesn't match a supported version

Bug Report

  • This is a bug report and I have read the contribution guidelines.

Description

Not sure if it should be a Bug report or what sorry if it isn’t. Im new to ubuntu/linux stuff so bear with me. I installed python and pip and then streamlink and twitchgui. I noticed i can’t start streams, it says “Unexpected Version check output” i thought the problem was twitch gui but i couldn’t start streams from the terminal neither . Whenever i type streamlink it outputs:

/usr/local/lib/python2.7/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/usr/local/bin/streamlink", line 6, in <module>
    from streamlink_cli.main import main
  File "/usr/local/lib/python2.7/dist-packages/streamlink_cli/main.py", line 22, in <module>
    from streamlink import __version__ as streamlink_version
  File "/usr/local/lib/python2.7/dist-packages/streamlink/__init__.py", line 73, in <module>
    from .api import streams
  File "/usr/local/lib/python2.7/dist-packages/streamlink/api.py", line 1, in <module>
    from .session import Streamlink
  File "/usr/local/lib/python2.7/dist-packages/streamlink/session.py", line 11, in <module>
    from streamlink.logger import StreamlinkLogger, Logger
  File "/usr/local/lib/python2.7/dist-packages/streamlink/logger.py", line 7, in <module>
    from streamlink.compat import is_py2
  File "/usr/local/lib/python2.7/dist-packages/streamlink/compat.py", line 48, in <module>
    from backports.shutil_which import which
ImportError: No module named shutil_which

I checked both urllib3 and chardet they are updated to the newest versions.

Expected / Actual behavior

The stream should start?

Log output

REPLACE THIS TEXT WITH THE LOG OUTPUT

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hello there. I received this warning on Elementary OS 0.4.1 (based on Ubuntu 16.04.2) after installing streamlink 1.1.1 with pip (as the ppa isn’t updated yet). It caused no issues for streams, but prevented Streamlink Twitch GUI from launching with the infamous unexpected version output error that was already referenced here.

I fixed the issue by manually updating the requests package using pip: pip install --upgrade requests Note that you may have to run this as root (sudo) depending on your Python installation, but be wary that doing so may or may not break other things relying on a different version of the package. If you are on a multi-user system, consider trying the --user parameter first.

The chardet package is now on version 3.0.4 and urllib3 is on 1.24.2.

Regards, Addi

I downgraded urllib3 for now and it works, following @robnardo suggestion:

pip install --upgrade --user urllib3==1.24.3

Uninstalled python2 and installed python3 now it works thanks.

I too am also getting this error. I have a Wagtail site running. I am using a docker alpine image pulling from python:3.6-alpine - so there is no python 2. My requirements.txt file (from a freeze) is below. One thing to note is the error i am getting is:

/usr/local/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25) or chardet (3.0.4) doesn't match a supported version!

which seems to involve the requests pip module

requirements.txt

beautifulsoup4==4.6.0
certifi==2019.3.9
chardet==3.0.4
cssutils==1.0.2
Django==2.1.8
django-appconf==1.0.3
django-cogwheels==0.2
django-colorful==1.3
django-compressor==2.2
django-csp==3.5
django-el-pagination==3.2.4
django-libsass==0.7
django-modelcluster==4.4
django-multiselectfield==0.1.8
django-redis==4.10.0
django-social-share==1.3.2
django-taggit==0.23.0
django-treebeard==4.3
djangorestframework==3.9.2
draftjs-exporter==2.1.5
elasticsearch==5.5.3
html5lib==1.0.1
idna==2.8
libsass==0.18.0
lxml==4.2.6
mysqlclient==1.3.13
Pillow==5.4.1
puput==1.0.3
python-dateutil==2.7.5
pytz==2019.1
rcssmin==1.0.6
redis==3.2.1
requests==2.21.0
rjsmin==1.0.12
six==1.12.0
Unidecode==1.0.23
untangle==1.1.1
urllib3==1.25
uWSGI==2.0.17
wagtail==2.4
wagtailmenus==2.13
webencodings==0.5.1
Willow==1.1

I have the same issue but it was on docker-compose, but I think it has similar problem. The python requests module needs latest urllib3 version (1.24.3). For me, I reinstall urllib3 with 1.24.3 version solves the problem. Try, sudo pip install -Iv urllib3==1.24.3

I had the same problem using Arch and docker-compose. This fixt it for me too. Thanks

/usr/lib/python2.7/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.24.3) or chardet (2.2.1) doesn’t match a supported version! RequestsDependencyWarning)

no solve on my centos 7

Maybe it’s your case but for most people it is not and that command often implies writing on the system’s python environment. On top of that, it is sudo’ed and as it would run as root, it might even use another environment’s pip than the one linked to your normal user scope!

You are correct. Since my comment attracted a lot of positive reactions (and is therefore likely to be seen by people looking for solutions) I added a note regarding the problem.

Regards, Addi

I have the same issue but it was on docker-compose, but I think it has similar problem. The python requests module needs latest urllib3 version (1.24.3). For me, I reinstall urllib3 with 1.24.3 version solves the problem. Try, sudo pip install -Iv urllib3==1.24.3

Just to follow up with my findings… if i restrict urllib3 to the following (see below) in my requirements.txt file I do not get the RequestDependencyWarning

urllib3<1.25,>=1.21.1