Open I-M-Russell opened 4 years ago
This kind of error has bugged me recently. Its a generic problem with non unicode characters in a file. see here: https://wiki.python.org/moin/UnicodeDecodeError https://wiki.python.org/moin/UnicodeDecodeError
Re your specific error see: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in ...github.com › pypa › pip › issues https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=2ahUKEwjb3Lqj4dnnAhXbyzgGHV1XBXcQFjABegQIARAB&url=https%3A%2F%2Fgithub.com%2Fpypa%2Fpip%2Fissues%2F4825&usg=AOvVaw2ZJFTkybiH6i1zsftGpHhq Regards Rob
RobBWilkinson@gmail.com
On 18/02/2020, at 12:18, I-M-Russell notifications@github.com wrote:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5
I hit the same problem, what I did, I just converted from one encoding to another (in this case utf-8) with iconv
:
file -i main.m
, in my case it was iso-8859-1
, so:iconv -f iso-8859-1 -t utf-8 main.m > test.m
the issue with encoding was resolved.
Traceback (most recent call last): File "/Users/isaac/anaconda3/lib/python3.7/site-packages/smop/main.py", line 58, in main buf = open(options.filename).read() File "/Users/isaac/anaconda3/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 89: invalid continuation byte Errors: 1
How could I solve this problem?
Traceback (most recent call last): File "/Users/isaac/anaconda3/lib/python3.7/site-packages/smop/main.py", line 58, in main buf = open(options.filename).read() File "/Users/isaac/anaconda3/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 89: invalid continuation byte Errors: 1
How could I solve this problem?