UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 34-35: unexpected end of data

Bug #1825213 reported by 이야기 on 2019-04-17
118
This bug affects 28 people
Affects Status Importance Assigned to Milestone
MenuLibre
Fix Released
Undecided
Unassigned

Bug Description

$ menulibre

(menulibre:32528): Gtk-WARNING **: 02:04:53.869: gtk_menu_attach_to_widget(): menu already attached to GtkMenuButton

(menulibre:32528): Gtk-WARNING **: 02:04:53.936: gtk_menu_attach_to_widget(): menu already attached to GtkMenuButton
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 2217, in do_activate
    self.win = MenulibreWindow(self, headerbar)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 250, in __init__
    self.configure_application_treeview(builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 589, in configure_application_treeview
    self.treeview = MenulibreTreeview.Treeview(self, builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreTreeview.py", line 48, in __init__
    self._configure_treeview(builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreTreeview.py", line 59, in _configure_treeview
    treestore = MenuEditor.get_treestore()
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 123, in get_treestore
    return menu_to_treestore(treestore, None, menu)
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 111, in menu_to_treestore
    treestore = menu_to_treestore(treestore, treeiter, item[3])
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 100, in menu_to_treestore
    tooltip = escapeText(item[2]['comment'])
  File "/usr/lib/python3/dist-packages/menulibre/util.py", line 99, in escapeText
    return GLib.markup_escape_text(text, len(text))
  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 415, in markup_escape_text
    return GLib.markup_escape_text(text, length)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 34-35: unexpected end of data

이야기 (iyagicom) wrote :
Timon (the-senate) wrote :

Hello, i had kinda the same problem and for me changing the system language to English worked.

Martin Dauskardt (md001) wrote :

similar problem here

(menulibre:10876): Gtk-WARNING **: 11:31:43.437: gtk_menu_attach_to_widget(): menu already attached to GtkMenuButton

(menulibre:10876): Gtk-WARNING **: 11:31:43.501: gtk_menu_attach_to_widget(): menu already attached to GtkMenuButton
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 2217, in do_activate
    self.win = MenulibreWindow(self, headerbar)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 250, in __init__
    self.configure_application_treeview(builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 589, in configure_application_treeview
    self.treeview = MenulibreTreeview.Treeview(self, builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreTreeview.py", line 48, in __init__
    self._configure_treeview(builder)
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreTreeview.py", line 59, in _configure_treeview
    treestore = MenuEditor.get_treestore()
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 123, in get_treestore
    return menu_to_treestore(treestore, None, menu)
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 111, in menu_to_treestore
    treestore = menu_to_treestore(treestore, treeiter, item[3])
  File "/usr/lib/python3/dist-packages/menulibre/MenuEditor.py", line 100, in menu_to_treestore
    tooltip = escapeText(item[2]['comment'])
  File "/usr/lib/python3/dist-packages/menulibre/util.py", line 99, in escapeText
    return GLib.markup_escape_text(text, len(text))
  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 415, in markup_escape_text
    return GLib.markup_escape_text(text, length)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 77: unexpected end of data
^C

switching system language from german to english is no option for me.

tags: added: disco
eugeneyale (eugeneyale) wrote :

Hi

The solution for me :

Edit the file menulibre util.py: sudo nano /usr/lib/python3/dist-packages/menulibre/util.py Search for: return GLib.markup_escape_text(text, len(text)) Replace with: return GLib.markup_escape_text(text)

found on :
https://discourse.ubuntubudgie.org/t/menulibre-does-not-start/1817

Sean Davis (bluesabre) wrote :

I've applied the suggested fix. Please confirm with git master and I'll get a release out soon.

https://git.launchpad.net/menulibre/commit/?id=c76a615110250dc70dcba93f7ca72690296f5fb9

Changed in menulibre:
status: New → Fix Committed
Sean Davis (bluesabre) on 2019-05-31
Changed in menulibre:
milestone: none → 2.2.1
status: Fix Committed → Fix Released
이야기 (iyagicom) wrote :

Good work.
Thank you very much.

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1825213

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments