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.
Error processing line 1 of /usr/lib/python2.7/dist-packages/pygst.pth:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 161, in addpackage
      if not dircase in known_paths and os.path.exists(dir):
    File "/usr/lib/python2.7/genericpath.py", line 18, in exists
      os.stat(path)
  TypeError: must be encoded string without NULL bytes, not str

Remainder of file ignored
Error processing line 1 of /usr/lib/python2.7/dist-packages/pygtk.pth:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 161, in addpackage
      if not dircase in known_paths and os.path.exists(dir):
    File "/usr/lib/python2.7/genericpath.py", line 18, in exists
      os.stat(path)
  TypeError: must be encoded string without NULL bytes, not str

Remainder of file ignored
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 16, in <module>
    from gi.repository import GObject
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 76, in load_module
    dynamic_module._load()
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 222, in _load
    version)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 90, in __init__
    repository.require(namespace, version)
gi.RepositoryError: Failed to load typelib file '/usr/lib/girepository-1.0/GLib-2.0.typelib' for namespace 'GLib': Invalid magic header
share|improve this question
    
I already done following command: 1. sudo apt-get update && sudo apt-get upgrade 2.sudo dpkg --reconfigure -a 3.sudo apt-get -f install –  ChitKo Jun 10 '12 at 15:47

1 Answer 1

I see you are trying to install python-gst0.10, which provides gstreamer bindings for Python. The files associated with that package are found by dpkg -S and these are the files giving errors:

python-gst0.10: /usr/share/pyshared/pygst.py
python-gst0.10: /usr/lib/python2.7/dist-packages/pygst.pth
python-gst0.10: /usr/share/pyshared/pygst.pth
python-gst0.10: /usr/lib/python2.7/dist-packages/pygst.py

I note you have tried sudo apt-get -f install and sudo dpkg --reconfigure -a, but it might also be worth trying sudo dpkg --configure -a, as that is used for packages that have not yet been properly configured; reconfigure is used for packages that have already been succesfully configured.

However, there also could be some corruption in the downloaded package as you keep getting errors when dpkg tries to read the files. Therefore to install the package successfully we could try to rename the package's currently corrupted list file with

sudo mv /var/lib/dpkg/info/python-gst0.10.list /var/lib/dpkg/info/python-gst0.10.list.old 

Now when sudo apt-get update is run and then you try to install the package, the package list will be redownloaded and you should be able to install successfully. This has worked for other packages for me, but if it doesn't work we can discuss more generic ways of sorting out these issues such as running sudo apt-get clean to clear the package cache.

share|improve this answer

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.