Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1045

UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 90: character maps to

$
0
0

I want to use a pretrained llm model from github repository. While i'm trying to install model package, i get following UnicodeDecodeError message.

× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]      Traceback (most recent call last):        File "<string>", line 2, in <module>        File "<pip-setuptools-caller>", line 34, in <module>        File "C:\Users\aysegul\AppData\Local\Temp\pip-install-ht9pqjmn\airio_b56e9a3f5a7c4bcca293a07cdb4caa99\setup.py", line 28, in <module>          _LONG_DESCRIPTION = fp.read()        File "C:\Users\aysegul\miniconda3\envs\pix2struct\lib\encodings\cp1254.py", line 29, in decode          return codecs.charmap_decode(input,self.errors,decoding_table)[0]      UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 90: character maps to <undefined>      [end of output] # Here it's cp1254.py line 23-line 29 codes:class IncrementalEncoder(codecs.IncrementalEncoder):    def encode(self, input, final=False):        return codecs.charmap_encode(input,self.errors,encoding_table)[0]class IncrementalDecoder(codecs.IncrementalDecoder):    def decode(self, input, final=False):        return codecs.charmap_decode(self.errors,decoding_table)[0]

I tried to add to cp1254.py "# - coding: utf-8 --" and change to codecs.charmap_decode(self.errors,decoding_table)[0] line's error type to "namereplace". but I couldn't get any solution. I think input is a string type not a document file. How can i fix this ?


Viewing all articles
Browse latest Browse all 1045

Trending Articles