UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) Ubuntu Software Center 5.3.11 won't start

Bug #1047281 reported by Paulo Narciso
148
This bug affects 46 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

I'm using Xubuntu 12.10 and today's software center update broke it.

When I start USC, a window opens briefly and close.

I have the following errors on console:

2012-09-07 11:34:26,341 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-09-07 11:34:26,344 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:20: Not using units is deprecated. Assuming 'px'.

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:22: Not using units is deprecated. Assuming 'px'.

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:20: Not using units is deprecated. Assuming 'px'.

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:22: Not using units is deprecated. Assuming 'px'.

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:20: Not using units is deprecated. Assuming 'px'.

(software-center:3586): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:22: Not using units is deprecated. Assuming 'px'.
2012-09-07 11:34:26,365 - softwarecenter.region - WARNING - failed to use geoclue: 'org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Geoclue.Master was not provided by any .service files'
2012-09-07 11:34:26,474 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-09-07 11:34:26,480 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2012-09-07 11:34:26,480 - root - ERROR - Could not find any typelib for LaunchpadIntegration
2012-09-07 11:34:26,500 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2012-09-07 11:34:26,509 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
Traceback (most recent call last):
  File "/usr/bin/software-center", line 185, in <module>
    app.run(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1418, in run
    self.show_available_packages(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1356, in show_available_packages
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 151, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 142, in init_view
    SoftwarePane.init_view(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 156, in init_view
    from softwarecenter.ui.gtk3.views.appdetailsview import (
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 57, in <module>
    from softwarecenter.ui.gtk3.widgets.labels import HardwareRequirementsBox
  File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/labels.py", line 25, in <module>
    class HardwareRequirementsLabel(Gtk.HBox):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/labels.py", line 34, in HardwareRequirementsLabel
    'no': u'<span foreground="red">%s</span>' % _(u'\u2718'),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

Previous version was working.

Tags: ca-escalated

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-center (Ubuntu):
status: New → Confirmed
Dave Morley (davmor2)
tags: added: ca-escalated
Changed in software-center (Ubuntu):
importance: Undecided → Medium
Michael Vogt (mvo)
Changed in software-center (Ubuntu):
importance: Medium → High
Revision history for this message
Michael Vogt (mvo) wrote :

Here is a patch, but I need to figure out a bit more what the issue is.

=== modified file 'softwarecenter/ui/gtk3/widgets/labels.py'
--- softwarecenter/ui/gtk3/widgets/labels.py 2012-06-11 14:50:53 +0000
+++ softwarecenter/ui/gtk3/widgets/labels.py 2012-09-10 12:05:26 +0000
@@ -29,9 +29,9 @@

     SUPPORTED_SYM = {
         # TRANSLATORS: symbol for "hardware-supported"
- 'yes': _(u'\u2713'),
+ 'yes': _('\u2713'),
         # TRANSLATORS: symbol for hardware "not-supported"
- 'no': u'<span foreground="red">%s</span>' % _(u'\u2718'),
+ 'no': '<span foreground="red">%s</span>' % _('\u2718'),
     }

     # TRANSLATORS: this is a substring that used to build the

Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

Ok, turns out the problem is that _() returns a string instead of a unicode object. This makes the this a unicode + str conversion.

Michael Vogt (mvo)
Changed in software-center (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Johan (oortjies) wrote :

I also have a problem with USC, here is my my error when started with terminal, maybe will through more light on the subject. I expect same bug is troubling me.

~$ software-center
2012-09-11 10:04:24,452 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-09-11 10:04:24,461 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:20: Not using units is deprecated. Assuming 'px'.

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:22: Not using units is deprecated. Assuming 'px'.

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:20: Not using units is deprecated. Assuming 'px'.

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:22: Not using units is deprecated. Assuming 'px'.

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:20: Not using units is deprecated. Assuming 'px'.

(software-center:13842): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:22: Not using units is deprecated. Assuming 'px'.
2012-09-11 10:04:24,520 - softwarecenter.region - WARNING - failed to use geoclue: 'org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Geoclue.Master was not provided by any .service files'
2012-09-11 10:04:24,758 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file

2012-09-11 10:04:24,765 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2012-09-11 10:04:24,764 - root - ERROR - Could not find any typelib for LaunchpadIntegration
2012-09-11 10:04:24,882 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2012-09-11 10:04:24,884 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2012-09-11 10:04:26,082 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2012-09-11 10:04:26,081 - root - ERROR - Could not find any typelib for Gst
2012-09-11 10:04:29,841 - softwarecenter.ui.gtk3.app - INFO - software-center-agent finished with status 0
2012-09-11 10:04:29,842 - softwarecenter.db.database - INFO - reopen() database
2012-09-11 10:04:29,842 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.3.12

---------------
software-center (5.3.12) quantal; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/software-center/inspect-memleak:
    - fix two memory leaks when the cache is re-opened after
      a package has been installed/removed (LP: #1003466), add
      memory usage test/monitoring utilities and a set of new
      unit tests
  * lp:~mvo/software-center/lp1047281:
    - fix crashing bug due to a unicode decode error and add
      a regression unit test (LP: #1047281)
  * lp:~mvo/software-center/region-whitelist-lp1006570:
    - fix missing region whitelist support that is used by
      the software-center-agent (LP: #1006570)
  * debian/test/run-tests:
    - unset TMPDIR and do not run with sh -x, thanks to Martin Pitt
    - fix when run from the binary Package, thanks to
      Jean-Baptiste Lallement

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/recommender-test-fix:
    - update the recommender feedback unit test to work on systems
      that are not opted-in
 -- Michael Vogt <email address hidden> Tue, 11 Sep 2012 14:37:43 +0200

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Johan (oortjies) wrote :

Distribution:- Ubuntustudio 12.10 quantal.

I have updated to "package software-center (5.3.12) quantal", but having the same problem as before.
All other updates as to this time and date installed.
here is my output from terminal:-

~$ software-center
2012-09-12 13:04:16,871 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-09-12 13:04:16,880 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:20: Not using units is deprecated. Assuming 'px'.

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:34:22: Not using units is deprecated. Assuming 'px'.

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:20: Not using units is deprecated. Assuming 'px'.

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:56:22: Not using units is deprecated. Assuming 'px'.

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:20: Not using units is deprecated. Assuming 'px'.

(software-center:7410): Gtk-WARNING **: Theme parsing error: softwarecenter.css:60:22: Not using units is deprecated. Assuming 'px'.
2012-09-12 13:04:16,940 - softwarecenter.region - WARNING - failed to use geoclue: 'org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Geoclue.Master was not provided by any .service files'
2012-09-12 13:04:17,184 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-09-12 13:04:17,191 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2012-09-12 13:04:17,191 - root - ERROR - Could not find any typelib for LaunchpadIntegration
2012-09-12 13:04:17,308 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2012-09-12 13:04:17,310 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2012-09-12 13:04:18,920 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2012-09-12 13:04:18,920 - root - ERROR - Could not find any typelib for Gst
2012-09-12 13:04:23,814 - softwarecenter.ui.gtk3.app - INFO - software-center-agent finished with status 0
2012-09-12 13:04:23,815 - softwarecenter.db.database - INFO - reopen() database
2012-09-12 13:04:23,815 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
I hope this helps to resolve this bug.

Revision history for this message
Johan (oortjies) wrote :

Maybe I should just mention that this was a clean install and that it worked previously, but an update some where along the line broke it.

summary: - Ubuntu Software Center 5.3.11 won't start
+ UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0:
+ ordinal not in range(128) Ubuntu Software Center 5.3.11 won't start
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.