Ubuntu Software Center, sync between computers hangs due to UnicodeEncodeError

Bug #935930 reported by Timothy Mortensen on 2012-02-19
This bug affects 3 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Gary Lasker

Bug Description

I have 4 computers sync'd to Software Center, on one computer, it will hang when trying to "sync between computers" to a different computer. All other computers will work as expected when trying to sync to other computers.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: software-center 5.0.4
ProcVersionSignature: Ubuntu 3.0.0-16.28-generic 3.0.17
Uname: Linux 3.0.0-16-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Sat Feb 18 19:11:50 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
PackageArchitecture: all
SourcePackage: software-center
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Timothy Mortensen (oscar13sd) wrote :
Gary Lasker (gary-lasker) wrote :

Hi Timothy, and thank you for your bug report. Could you please try running Software Center from a terminal window as follows:

  $ software-center

And then try again to access your software list from the other computer. If it hangs again, please paste any output in the terminal to this bug report. That will help us to investigate this bug further.

Thanks! Your help is much appreciated!

Changed in software-center (Ubuntu):
status: New → Incomplete
Timothy Mortensen (oscar13sd) wrote :

2012-03-27 09:36:14,931 - softwarecenter.ui.gtk3.em - INFO - EM's: 17 15 21
2012-03-27 09:36:17,270 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-03-27 09:36:17,480 - softwarecenter.ui.gtk3.utils - INFO - Softwarecenter style provider for ambiance Gtk theme: /usr/share/software-center/ui/gtk3/css/softwarecenter.css
2012-03-27 09:36:23,031 - softwarecenter.ui.gtk3.app - INFO - software-center-agent finished with status 0
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/installedpane.py", line 443, in rebuild_oneconfview
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 504, in set_nocategory_documents
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 72, in __init__
    None, pkg_count)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 54, in __init__
    self.display_name = GObject.markup_escape_text(display_name)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 10: ordinal not in range(128)

Gary Lasker (gary-lasker) wrote :

Thanks Timothy, that looks like what we needed!

Changed in software-center (Ubuntu):
status: Incomplete → Confirmed
summary: - Ubuntu Software Center, sync between computers hangs
+ Ubuntu Software Center, sync between computers hangs due to
+ UnicodeEncodeError
eryksun (eryksun) wrote :

I had the same problem caused by curly quotes (\u201c, \u201d) around the computer name. I'm not familiar with GObject, but it seems to be happy with utf-8 (inserted before line 54 of appstore2.py):

    display_name = display_name.encode('utf-8')

Changed in software-center (Ubuntu):
importance: Undecided → Low
assignee: nobody → Gary Lasker (gary-lasker)
Gary Lasker (gary-lasker) wrote :

Thanks eryksun! I have implemented a variant of your suggestion as the fix in the attached branch (we have a generic utility function that we use for these sorts of errors).

Thanks again!

Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

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

software-center (5.1.14) precise; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp962580:
    - add locking to the expunge helper process to fix bugs that are triggered
      if multiple expunge cache processes are run (LP: #962580)
  * lp:~mvo/software-center/cache-refresh-glitch:
    - ensure that we get a full refresh if a pkg was not available before
      show_app is called
  * lp:~mvo/software-center/lp940482:
    - fix crash if the debfile does not return proper utf8 for the
      description (LP: #940482)
  * lp:~mvo/software-center/lp966514:
    - properly handle network disconnect conditions with the Ubuntu
      SSO dialog (LP: #966514)
  * lp:~mvo/software-center/lp966879:
    - fix for crashes in the installed view treeview (LP: #966879,
      LP: #950899)
  * lp:~mvo/software-center/lp846204:
    - fix ValueError crashes in get_iter due to invalid tree paths
      (LP: #846204)
  * lp:~mvo/software-center/lp964433:
    - disconnect the model from the view before calling set_from_matches
      (LP: #964433)
  * lp:~mvo/software-center/treeview-keep-state-on-db-cache-change:
   - restore the state of the installed view treeview when the
     the db or cache changes, such as on an app install or remove
  * lp:~mvo/software-center/946393:
   - fix installing multiple apps when in a custom list view (LP: #946393)
  * lp:~mvo/software-center/lp969050:
   - disconnect the view when the model is cleared to avoid a furry of
     cursor_changed signals as the rows get removed (LP: #969050)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/installed-pane-refresh:
    - avoid rebuilding the treeview in the installedpane if its not
      required (LP: #828887)
  * lp:~gary-lasker/software-center/fix-crash-lp967036:
    - Small branch to fix a crash due to a UnicodeDecodeError when accessing
      the short description for H/W requirements (LP: #967036)
  * lp:~gary-lasker/software-center/fix-crash-lp935930:
    - fix a crash due to a UnicodeDecodeError (LP: #935930)
 -- Michael Vogt <email address hidden> Fri, 30 Mar 2012 18:00:50 +0200

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers