Hi, I encountered a UnicodeDecodeError when reading some data that was quite badly corrupted. This occurred when iterating through a JSONResultsReader. Error occurred using Python 3.10.5.
Error was:
UnicodeDecodeError: 'utf-8' codec can't decode byte [val] in position [val]: invalid continuation byte
The stacktrace points to json.loads (imported as json_loads) - this pull request catches the exception and re-reads, ignoring the decode error. It may be beneficial to raise a warning to the user, but apologies as I'm not familiar enough with the codebase for that just yet :)
Hi, I encountered a
UnicodeDecodeError
when reading some data that was quite badly corrupted. This occurred when iterating through aJSONResultsReader
. Error occurred using Python 3.10.5.Error was:
UnicodeDecodeError: 'utf-8' codec can't decode byte [val] in position [val]: invalid continuation byte
The stacktrace points to
json.loads
(imported asjson_loads
) - this pull request catches the exception and re-reads, ignoring the decode error. It may be beneficial to raise a warning to the user, but apologies as I'm not familiar enough with the codebase for that just yet :)