Software-centre and update-manager have a python problem

Asked by Jay Steichmann

When I start software-center or update manager in GUI, I get a crash report. When I start either of them in terminal, I get the following error(s):

jaymo2000@jaymo2000-OptiPlex-755:~$ sudo software-center
Traceback (most recent call last):
  File "/usr/bin/software-center", line 36, in <module>
    from softwarecenter.utils import (
  File "/usr/share/software-center/softwarecenter/utils.py", line 30, in <module>
    import xml.sax.saxutils
  File "/usr/lib/python2.7/xml/sax/__init__.py", line 22, in <module>
    from xmlreader import InputSource
ValueError: bad marshal data (unknown type code)

jaymo2000@jaymo2000-OptiPlex-755:~$ update-manager
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 33, in <module>
    from UpdateManager.UpdateManager import UpdateManager
  File "/usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py", line 52, in <module>
    import xml.sax.saxutils
  File "/usr/lib/python2.7/xml/sax/__init__.py", line 22, in <module>
    from xmlreader import InputSource
ValueError: bad marshal data (unknown type code)

I am not sure if this is as symple as uninstalling and reinstalling python 2.7, but would appreciate advice.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Don't use sudo with GUI apps, you will damage the ownership of files in your home folder. gksudo is for GUI apps.

If you run:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
sudo apt-get --reinstall install software-center

Is it ok?

Revision history for this message
Jay Steichmann (jjsteich) said :
#2

Thanks, Andrew, especially for the gksudo tip. I reran the update & upgrade & clean, then ran the reinstall of the software-center. I still get errors seemingly related to the python 2.7, as follows:
jaymo2000@jaymo2000-OptiPlex-755:~$ sudo apt-get --reinstall install software-center
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 622 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu/ precise-updates/main software-center all 5.2.6 [622 kB]
Fetched 622 kB in 1s (417 kB/s)
(Reading database ... 341086 files and directories currently installed.)
Preparing to replace software-center 5.2.6 (using .../software-center_5.2.6_all.deb) ...
Unpacking replacement software-center ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Setting up software-center (5.2.6) ...
ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
    from softwarecenter.db.application import Application, AppDetails
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 26, in <module>
    from softwarecenter.utils import UnimplementedError, utf8
  File "/usr/share/software-center/softwarecenter/utils.py", line 30, in <module>
    import xml.sax.saxutils
  File "/usr/lib/python2.7/xml/sax/__init__.py", line 22, in <module>
    from xmlreader import InputSource
ValueError: bad marshal data (unknown type code)
Traceback (most recent call last):
  File "/usr/sbin/update-software-center", line 38, in <module>
    from softwarecenter.db.update import rebuild_database
  File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
    from softwarecenter.distro import get_distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 26, in <module>
    from softwarecenter.utils import UnimplementedError, utf8
  File "/usr/share/software-center/softwarecenter/utils.py", line 30, in <module>
    import xml.sax.saxutils
  File "/usr/lib/python2.7/xml/sax/__init__.py", line 22, in <module>
    from xmlreader import InputSource
ValueError: bad marshal data (unknown type code)

The update-manager is already the latest version, shows no problems apparently. Running either software-center or update-manager in terminal, using gksudo returns the following (identical output for both):
jaymo2000@jaymo2000-OptiPlex-755:~$ gksudo update-manager

(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_long_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_long_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_long_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_long_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_string_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_prepend_search_path: assertion `GTK_IS_ICON_THEME (icon_theme)' Failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_prepend_search_path: assertion `GTK_IS_ICON_THEME (icon_theme)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_icon_theme_prepend_search_path: assertion `GTK_IS_ICON_THEME (icon_theme)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_string_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_string_property: assertion `GTK_SETTINGS (settings)' failed
(gksudo:7772): Gtk-CRITICAL **: IA__gtk_settings_set_string_property: assertion `GTK_SETTINGS (settings)' failed

Revision history for this message
Jay Steichmann (jjsteich) said :
#3

Andrew, I took your advice on the reinstall and applied it to run sudo apt-get --reinstall install python2.7. All is now bliss, it works, thank you. If you say it is ok to put problem solved to your answer, I will do so. Thanks, I could not have done it otherwise without a lot of stumbling.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#4

Its cool, you'll learn as you use the OS.

Please mark as solved.

Revision history for this message
Jay Steichmann (jjsteich) said :
#5

Thanks actionparsnip, that solved my question.