Skip to content

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 229810: invalid start byte #90

@mukeshguptakc

Description

@mukeshguptakc

Hello,

We are working on fetching changelist entries between two snapshots using the Isilon SDK. While doing so, we noticed an issue:

Exception Traceback:

In Isilon Library at path (File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/rest.py"", line 230, in request") this lines proceeses the entry r.data = r.data.decode('utf8')" and fails with error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 229810: invalid start byte"
Traceback (most recent call last):"
      api_response = api_instance.get_changelist_entries("
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/api/snapshot_changelists_api.py"", line 58, in get_changelist_entries"
      (data) = self.get_changelist_entries_with_http_info(changelist, **kwargs)  # noqa: E501"
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/api/snapshot_changelists_api.py"", line 141, in get_changelist_entries_with_http_info"
      return self.api_client.call_api("
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/api_client.py"", line 341, in call_api"
      return self.__call_api(resource_path, method,"
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/api_client.py"", line 173, in __call_api"
      response_data = self.request("
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/api_client.py"", line 363, in request"
      return self.rest_client.GET(url,"
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/rest.py"", line 318, in GET"
      return self.request(""GET"", url,"
    File ""/tmp/libs/isilon/lib/isilon_sdk/v9_7_0/rest.py"", line 230, in request"
      r.data = r.data.decode('utf8')"
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 229810: invalid start byte"
  "
  During handling of the above exception, another exception occurred:"
  "
  OperationFailed: Failed to create snapshot changelist. Error: 'utf-8' codec can't decode byte 0xbf in position 229810: invalid start byte"

Steps to Reproduce:

Create two snapshot with large snapshot changelist entries and fetch the changelist entries.
The snapshot changelist entries took around 4 hours of get_changelist_entries and had provided the changelist entries as well.
The snapshot changelist entries we receive from invoking get_changelist_entries and had provided the changelist entries prior to we hit the error.
For specific nas share we are receiving the error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 229810: invalid start byte

Expected Behavior:

For most of the cases where the snapshot changelist entries were fetched we didn't observe this error and the decode at line r.data = r.data.decode('utf8')" should be able to decode and handle it.

SDK Version : 9_7_1
isilon-sdk==0.6.0

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