Skip to content
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

[1.3.11rc1] Potential UnicodeError in printer safety check for author matching #3091

Closed
sentry-io bot opened this issue Mar 28, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@sentry-io
Copy link

commented Mar 28, 2019

Problem

Sentry Issue: SERVER-1X

UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in position 2: ordinal not in range(128)
  File "home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check/__init__.py", line 117, in _run_checks
    method(*args, **kwargs)
  File "home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check/checks/firmware_unsafe.py", line 59, in received
    if self.AUTHOR in lower_line:

There was an error running method received on check <octoprint.plugins.printer_safety_check.checks.firmware_unsafe.AnycubicCheck object at 0x73176af0>

@foosel foosel added this to the 1.3.11 milestone Mar 29, 2019

foosel added a commit that referenced this issue Apr 1, 2019

♻ Turn lines read from serial into unicode
Backported from devel branch.

Should also fix #3091

@foosel foosel added the status:solved label Apr 1, 2019

@foosel

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2019

1.3.11rc2 was just released

@foosel foosel closed this Apr 4, 2019

foosel added a commit that referenced this issue Apr 10, 2019

Switch lines read from serial back to bytes
While long term we want to have unicode here, the rest of the code
is not even remotely prepared for handling utf-8 strings as visible in
the large amount of unicode issues visible in sentry.

So for now we go back to byte objects and fix #3091 differently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.