Skip to content

Requests v2.11.0 causes breakage #1155

@plauche

Description

@plauche

This is a known issue within requests and looks like it will be fixed in v2.11.1. Documenting for the benefit of anyone else who runs into this :).

After a recent pip upgrade I found that docker-py was passing along an error from requests:

File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 307, in _stream_raw_result
for out in response.iter_content(chunk_size=1, decode_unicode=True):
File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 372, in stream_decode_response_unicode
raise UnicodeError("Unable to decode contents with encoding %s." % encoding)
UnicodeError: Unable to decode contents with encoding None.

This has already been reported to requests (https://github.com/kennethreitz/requests/issues/3481) and fixed (kennethreitz/requests@d7f56ba) for the next version.

If you are running into this issue, the easiest fix for now appears to be reverting to a pre 2.11 version of requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions