prusa3d / PrusaControl-settings

11 stars 8 forks source link

UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 54870 #5

Closed SenHime closed 6 years ago

SenHime commented 6 years ago

Hi,

Following the last update I got a "Failed to execute main script" error while launching PrusaControl. And in the log :

[ERROR][main.py:95:log_exception()]-Logging an uncaught exception Traceback (most recent call last): File "main.py", line 193, in File "main.py", line 159, in main File "controller.py", line 65, in init File "parameters.py", line 357, in init File "parameters.py", line 497, in check_versions File "parameters.py", line 576, in get_materials_info File "json__init__.py", line 265, in load File "c:\python35\lib\encodings\cp1252.py", line 23, in decode UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 54870: character maps to

It seems related to materials_i3_mk3.json, "Plasty Mladeč PLA" was not parsed correctly (Windows/French OS) I had to turn out "automatic_update_parameters" in prusacontrol.cfg to launch the application again. Maybe it would be better to avoid special characters or PrusaControl needs an update to support it.

mayerjRRR commented 6 years ago

Getting the same error:

[ERROR][main.py:95:log_exception()]-Logging an uncaught exception
Traceback (most recent call last):
  File "main.py", line 193, in <module>
  File "main.py", line 159, in main
  File "controller.py", line 65, in __init__
  File "parameters.py", line 357, in __init__
  File "parameters.py", line 497, in check_versions
  File "parameters.py", line 576, in get_materials_info
  File "json\__init__.py", line 265, in load
  File "c:\python35\lib\encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 54870: character maps to <undefined>
mayerjRRR commented 6 years ago

@SenHime Your fix worked for me, thanks a lot!

jindrichbenes commented 6 years ago

The suspected character was removed, could you try to turn update on and restart prusa control?

SenHime commented 6 years ago

I re-enabled auto-update and it seems ok now, thank you 👍