Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It seems like I am getting some error related to Python, but I am not sure why I am getting it. When I ran Software Updater (in 12.10) from unity, it didn't even fire up.

When I did this from the terminal:

sudo update-manager

I am getting this trace, and update manager doesn't even open. I don't think this is a bug, so I am asking it here.

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
  File "/usr/lib/python3/dist-packages/gi/repository/__init__.py", line 25, in <module>
    from ..importer import DynamicImporter
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 24, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 15, in <module>
    import xml.dom, xml.dom.minidom
ImportError: No module named xml.dom

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
  File "/usr/lib/python3/dist-packages/gi/repository/__init__.py", line 25, in <module>
    from ..importer import DynamicImporter
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 24, in <module>
    import logging
ImportError: No module named logging

However, apt-get commands work fine. Python seems to be installed properly(?), so I can't figure out what the trace is saying. Any idea what can I do to get back update-manager working?

share|improve this question
    
Did you just add/remove/modify any of your files which could have messed up with these configurations? Or did you add/remove any ppa, though they don't seem to be of relevance here? –  Jobin Dec 28 '12 at 19:25
    
Try with the following command and update again. sudo rm -vf /var/cache/apt/*.bin –  Lucio Dec 28 '12 at 19:29
    
@Jobin: I've been playing with gnome couple of days ago and have switched to gdm as my lightdm works properly no more, but I don't think that has anything to do with python3 since I haven't even touched it? I wrote what happened recently here: askubuntu.com/questions/232926/…;, but do you think that must have affected my update-manager? –  Forbidden Overseer Dec 28 '12 at 19:33
    
@Lucio: Did it. Still no luck with update-manager though. Same errors again. –  Forbidden Overseer Dec 28 '12 at 19:33
    
Try with the following commands. sudo apt-get install -f and then sudo dpkg --configure -a –  Lucio Dec 28 '12 at 19:34
show 2 more comments

1 Answer

up vote 2 down vote accepted

The modules logging and xml.dom come from python3.2-minimal and python3.2 respectively.

This should fix the problem:

sudo apt-get install --reinstall python3.2 python3.2-minimal
share|improve this answer
    
Yup! That made it work... update-manager works fine now!! So, just asking, what must have broken in python3.2? –  Forbidden Overseer Dec 28 '12 at 19:46
1  
@ForbiddenOverseer: who knows? Today I have read many questions of users that have played with sudo rm. Perhaps you have removed some stuff without noticing? –  Andrea Corbellini Dec 28 '12 at 19:48
    
+1 for "Today I have read many questions of users that have played with sudo rm"... lolwut?? That was a laughably cynical way to put it... :D Well, I don't remember messing with python tbh... But anyway thanks for your help. :) –  Forbidden Overseer Dec 28 '12 at 20:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.