running gives a UnicodeDecodeError
Closed this issue · 1 comments
neyi780 commented
C:\Users\oscar\Desktop\sb>python -m skyblock
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\oscar\Desktop\sb\skyblock\__main__.py", line 18, in <module>
skyblock_main()
File "C:\Users\oscar\Desktop\sb\skyblock\__main__.py", line 13, in skyblock_main
from .menu import main
File "C:\Users\oscar\Desktop\sb\skyblock\menu.py", line 9, in <module>
from .function.io import *
File "C:\Users\oscar\Desktop\sb\skyblock\function\__init__.py", line 1, in <module>
from .enchanting import *
File "C:\Users\oscar\Desktop\sb\skyblock\function\enchanting.py", line 4, in <module>
from ..object.object import *
File "C:\Users\oscar\Desktop\sb\skyblock\object\__init__.py", line 3, in <module>
from .collection import *
File "C:\Users\oscar\Desktop\sb\skyblock\object\collection.py", line 9, in <module>
from .object import *
File "C:\Users\oscar\Desktop\sb\skyblock\object\object.py", line 5, in <module>
from .item_wrapper import item_type
File "C:\Users\oscar\Desktop\sb\skyblock\object\item_wrapper.py", line 16, in <module>
from ..format.function import format_temp
File "C:\Users\oscar\Desktop\sb\skyblock\format\__init__.py", line 3, in <module>
from .template import *
File "C:\Users\oscar\Desktop\sb\skyblock\format\template.py", line 27, in <module>
TEMPLATES[category][file_name[:-4]] = file.read()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\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
This was left in the last decoding bug fix. I fixed it by just replacing the original open
with a wrapped function with an encoding set to UTF-8. Should work now.