Comment 3 for bug 1381050

Revision history for this message
Bruno Nova (brunonova) wrote :

I finally found the cause of the problem!
It seems that the DBus service (or the whole DBus) is not running in a UTF-8 locale, thus causing errors in UTF-8 strings.

The workaround is to edit softwareproperties/SoftwareProperties.py and add:
    path = path.encode('utf-8')
in method "def add_key(self, path)" around line 800 before the line:
    if not os.path.exists(path):

This encoding issue may be causing problems in other parts of the program, and other programs.

Meanwhile, I found another bug:
Dragging and dropping a key file to the list doesn't work, raising an exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 759, in on_auth_drag_data_received
    keydata = selection.data.strip()
AttributeError: 'SelectionData' object has no attribute 'data'