-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mainsail.cfg unicode symbol issue #32
Comments
I've tried to reproduce this issue on a Docker container running Python 2.7.18 and it worked fine... @UserDmitry can you please upload a full klippy.log so we can check the issue directly? |
Yes, of course. |
Looking at the log I can see Klipper is using python 3.6.9, so that might be the problem as AFAIK, unicode support was added in 3.9. Nevertheless, I do think we should fix this issue here as it is such a trivial fix. @zellneralex any comments on this? |
I really love it, I am only adding that comment so that people understand the cryptic Unicode usage here. I will change the comment in the next days. Currently I am on a business trip. |
Klipper report an issue "Unable to open *path*\mainsail.cfg file". In klippy.log there is a error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 7558: ordinal not in range(128)
Config error
Traceback (most recent call last):
File "/home/sapphire/klipper/klippy/configfile.py", line 159, in _read_config_file
data = f.read()
File "/home/sapphire/klippy-env/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 7558: ordinal not in range(128)
This byte appears at str. number 137:
# we need to use the unicode (\u00B0) for the ° as py2 env's would throw an error otherwise
Unicode symbol in this comment " ° " cause this error.
The text was updated successfully, but these errors were encountered: