PyRetri / PyRetri

Open source deep learning based unsupervised image retrieval toolbox built on PyTorch🔥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnicodeDecodeError while running python setup.py install

Junah-Park opened this issue · comments

Error:

Traceback (most recent call last):
File "setup.py", line 179, in
long_description=readme(),
File "setup.py", line 69, in readme
content = fid.read()
File "C:\Users\user\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 273: character maps to


Fix:
edited the readme() function in setup.py. open README.md with encoding utf8

def readme():
"""Get readme.
Returns:
str, readme content string.
"""
with open('README.md', encoding="utf8") as fid:
content = fid.read()
return content
""

I faced the same issue. I am wondering why this is not fixed in the main branch.