"python setup.py install" returns Unicode decoding error
Closed this issue · 1 comments
wackymagician59 commented
Command line
C:\Users\---\Desktop\skyblock>python -m skyblock
Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\---\Desktop\skyblock\skyblock\__main__.py", line 18, in <module>
skyblock_main()
File "C:\Users\---\Desktop\skyblock\skyblock\__main__.py", line 13, in skyblock_main
from .menu import main
File "C:\Users\---\Desktop\skyblock\skyblock\menu.py", line 9, in <module>
from .function.io import *
File "C:\Users\---\Desktop\skyblock\skyblock\function\__init__.py", line 1, in <module>
from .enchanting import *
File "C:\Users\---\Desktop\skyblock\skyblock\function\enchanting.py", line 4, in <module>
from ..object.object import *
File "C:\Users\---\Desktop\skyblock\skyblock\object\__init__.py", line 3, in <module>
from .collection import *
File "C:\Users\---\Desktop\skyblock\skyblock\object\collection.py", line 9, in <module>
from .object import *
File "C:\Users\---\Desktop\skyblock\skyblock\object\object.py", line 5, in <module>
from .item_wrapper import item_type
File "C:\Users\---\Desktop\skyblock\skyblock\object\item_wrapper.py", line 16, in <module>
from ..format.function import format_temp
File "C:\Users\---\Desktop\skyblock\skyblock\format\__init__.py", line 3, in <module>
from .template import *
File "C:\Users\---\Desktop\skyblock\skyblock\format\template.py", line 27, in <module>
TEMPLATES[category][file_name[:-4]] = file.read()
File "C:\Python39\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 0x81 in position 151: character maps to <undefined>
peter-hunt commented
The same error was found here. Probably caused by the same reason.
I've wrapped the file opening function with the default of utf-8 encoding, should work by now.