Skip to content

UnicodeDecodeError with Python2 #224

@wallecan

Description

@wallecan

Commit 4c0c633 introduced a regression for Python2.
The pod spec here contains UTF-8 characters:

oc = DynamicClient(client.ApiClient())
pod = oc.resources.get(kind='Pod', api_version='v1')
pod.get(namespace='xxx', name='yyy')
Traceback (most recent call last):
File "", line 1, in
File "/home/reporting/.local/lib/python2.7/site-packages/openshift/dynamic/client.py", line 42, in inner
return serialize(resource, resp)
File "/home/reporting/.local/lib/python2.7/site-packages/openshift/dynamic/client.py", line 51, in serialize
return response.data.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1974: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions