kcjengr / qtpyvcp

QtPyVCP - Qt and Python based Virtual Control Panel framework for LinuxCNC.
https://www.qtpyvcp.com
Other
88 stars 48 forks source link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128) #61

Closed sebastianm1986 closed 1 year ago

sebastianm1986 commented 3 years ago

(Please fill in this issue template with as much information as you can about the circumstances under which the issue occurred, and the steps needed to reproduce it.)

Steps to reproduce the problem

(provide as detailed a step by step as you can)

1. 2. 3.

This is what I expected to happen

(explain what you thought should have happened)

This is what happened instead

(explain what happened instead)

It worked properly before this

(did it work before? what changed?)

Traceback

Traceback (most recent call last):
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/qtdesigner/designer_plugin.py", line 91, in createWidget
    w = self.pluginClass()(parent)
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/form_widgets/main_window.py", line 57, in __init__
    self.setMenuBar(self.buildMenuBar(menu))
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/form_widgets/main_window.py", line 246, in buildMenuBar
    recursiveAddItems(menu_bar, menus)
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/form_widgets/main_window.py", line 231, in recursiveAddItems
    recursiveAddItems(new_menu, items)
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/form_widgets/main_window.py", line 235, in recursiveAddItems
    new_menu = _initialize_object_from_dict(item, parent=menu)
  File "/home/sebastian/qtpyvcp/qtpyvcp/app/launcher.py", line 208, in _initialize_object_from_dict
    return obj(*args, **kwargs)
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/recent_files_menu.py", line 56, in __init__
    self.update(files or self.status.recent_files())
  File "/home/sebastian/qtpyvcp/qtpyvcp/widgets/recent_files_menu.py", line 61, in update
    fname = fname.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128)

Options

{}

System Info

 * Description: Debian GNU/Linux 10 (buster)
 * Kernel: 4.19.0-13-rt-amd64
 * Qt version: v5.11.3
 * Qt bindings: PyQt5 v5.11.3
 * LinuxCNC version: v2.8.1
 * QtPyVCP version: v0.3.11+8.g11c816af

Attachments

Please also find and attach the following files, along with any others that may be helpful:

TurBoss commented 3 years ago

Hello, Sorry for the late reply this look like the bug with especial characters in the tool comments

this is fixed and will be on the next release bugfix

Thanks