kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.37k stars 997 forks source link

Test suite failure on decode_utf8 function for AttributeError #1379

Closed rockstorm101 closed 1 year ago

rockstorm101 commented 1 year ago

Test suite fails as expected. See https://github.com/kliment/Printrun/pull/1367#discussion_r1285528883

  File "/printrun/printcore.py", line 407, in _readline
    self.logError(_("Can't read from printer (disconnected?) (SerialException): {0}").format(decode_utf8(str(e))))
                                                                                             ^^^^^^^^^^^^^^^^^^^
  File "/printrun/utils.py", line 194, in decode_utf8
    s = s.decode("utf-8")
        ^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?