You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
This fails with the error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
in ".../2.7/lib/python2.7/StringIO.py", line 106, in seek.
I searched, and this seems to be because
The StringIO object can accept either Unicode or 8-bit strings, but mixing the two may take some care. If both are used, 8-bit strings that cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause a UnicodeError to be raised when getvalue() is called.
(from a docstring inside StringIO.py).
Should we try to uniformize this?
The text was updated successfully, but these errors were encountered:
Instead of list comprehension which will call a function to get the integer value of the bytes directly convert it to bytearray which is more optimal structure for storing list of bytes.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Consider the following function to return a string in HTML from a pdf:
This fails with the error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
in
".../2.7/lib/python2.7/StringIO.py", line 106, in seek
.I searched, and this seems to be because
Should we try to uniformize this?
The text was updated successfully, but these errors were encountered: