It seems that Alkis is correct!

The variable 'value' inside the last_package method
(aptdaemon/pkcompat.py, line 670), which is called a little after the
'Check' button is pressed, contains the package name, the available new
version, the architecture AND the PPA's description string (separated
with a semicolon).

E.g.: numlockx;1.2-4;i386;Αποθετήριο Τεχνικής Στήριξης ΣΕΠΕΗΥ

Now, if the PPA's description contains only ascii letters it's all good. If not 
(as in the example above) we have an exception.
In line 671, the 'value' variable (a str object) is passed as a parameter to 
the dbus.String() function which expects a unicode object. So dbus.String tries 
to convert it using a plain .decode() which uses ascii as the default codec and 
boom: 'ascii codec can't decode [...]' :)

As Alkis stated the solution is to convert the 'value' variable to a
unicode object with value.decode('utf-8') before passing it to
dbus.String() so it will try to convert the str to unicode using the
utf-8 codec instead of ascii.

I have included a patch fixing the problem.
Fotis

** Attachment added: "patch"
   
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/978654/+attachment/3315542/+files/patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/978654

Title:
  <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
  byte 0xc3 in position 24: ordinal not in range(128)

To manage notifications about this bug go to:
https://bugs.launchpad.net/aptdaemon/+bug/978654/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to