The problem is probably that dbus.String() expects a unicode string, and aptdaemon is sending a utf-8 string.
Maybe is should be using value.decode("utf-8") instead:
self._last_package = dbus.String(value.decode("utf-8"))
Python example:
$ python
>>> import dbus
>>> s="Hi in Greek is Γεια"
>>> dbus.String(s.decode("utf-8"))
dbus.String(u'Hi in Greek is \u0393\u03b5\u03b9\u03b1')
>>> dbus.String(s)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 15: ordinal not in range(128)
The problem is probably that dbus.String() expects a unicode string, and aptdaemon is sending a utf-8 string. "utf-8" ) instead: value.decode( "utf-8" ))
Maybe is should be using value.decode(
self._last_package = dbus.String(
Python example:
$ python s.decode( "utf-8" )) u03b5\u03b9\ u03b1')
>>> import dbus
>>> s="Hi in Greek is Γεια"
>>> dbus.String(
dbus.String(u'Hi in Greek is \u0393\
>>> dbus.String(s)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 15: ordinal not in range(128)