gdk-update-viewer UnicodeDecodeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
packagekit-gnome (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: packagekit-gnome
When i started gdk-update-viewer i got this error in a dialog:
Error Type: <type 'exceptions.
Error Value: 'ascii' codec can't decode byte 0xc3 in position 7: ordinal not in range(128)
File : /usr/share/
main()
File : /usr/share/
run(args, options.single)
File : /usr/share/
backend.
File : /usr/lib/
self.
File : /usr/lib/
self.
File : /usr/share/
updated)
File : /usr/lib/
changelog, state, issued, updated))
ProblemType: Bug
Architecture: amd64
Date: Fri Aug 28 19:57:57 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/
Package: packagekit-gnome 2.27.2-0ubuntu2 [modified: usr/bin/
ProcEnviron:
PATH=(custom, user)
LANG=sv_SE.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: packagekit-gnome
Uname: Linux 2.6.31-6-generic x86_64
Changed in packagekit-gnome (Ubuntu): | |
status: | New → Confirmed |
This bug persists in 2.27.2-0ubuntu3. Line number are slightly different of course:
Error Type: <type 'exceptions. UnicodeDecodeEr ror'> PackageKit/ helpers/ apt/aptBackend. py, line 1948, in <module> PackageKit/ helpers/ apt/aptBackend. py, line 1945, in main PackageKit/ helpers/ apt/aptBackend. py, line 1907, in run dispatcher( args) python2. 6/dist- packages/ packagekit/ backend. py, line 636, in dispatcher dispatch_ command( args[0] , args[1:]) python2. 6/dist- packages/ packagekit/ backend. py, line 537, in dispatch_command get_update_ detail( package_ ids) PackageKit/ helpers/ apt/aptBackend. py, line 753, in get_update_detail python2. 6/dist- packages/ packagekit/ backend. py, line 242, in update_detail
Error Value: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
File : /usr/share/
main()
File : /usr/share/
run(args, options.single)
File : /usr/share/
backend.
File : /usr/lib/
self.
File : /usr/lib/
self.
File : /usr/share/
updated)
File : /usr/lib/
changelog, state, issued, updated))
Cause of the problem:
For packages without changelogs available (which is the case for PPAs) a message stating this circumstance is printed instead. This string is internationalized and may contain non-ascii characters in languages != C. For example, in de_DE.UTF-8 the "changelog" variable contains 'Die Liste der \xc3\x84nderungen ist momentan nicht verf\xc3\xbcgbar.' Note that it seems to be a plain string, not a Unicode string. I traced this down using this simple patch:
--- /usr/lib/ python2. 6/dist- packages/ packagekit/ backend. py.orig 2009-09-07 06:54:18.000000000 +0200 python2. 6/dist- packages/ packagekit/ backend. py 2009-09-07 07:55:02.000000000 +0200 encode( "ascii" , "replace")
self. _send(" updatedetail\ t%s\t%s\ t%s\t%s\ t%s\t%s\ t%s\t%s\ t%s\t%s\ t%s\t"
"% s" % (package_id, updates, obsoletes, vendor_url,
bugzilla_ url, cve_url, restart, update_text,
+++ /usr/lib/
@@ -236,6 +236,10 @@
@param issued:
@param updated:
'''
+ try:
+ changelog = changelog.
+ except UnicodeDecodeError:
+ changelog = repr(changelog)