Jul 102014
 

Recently I had problems restarting kippo. The error was:

Starting kippo in background...Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 652, in run
    runApp(config)
  File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/lib/python2.7/dist-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "kippo.tac", line 15, in <module>
    from twisted.conch.ssh import factory, keys
  File "/usr/lib/python2.7/dist-packages/twisted/conch/ssh/factory.py", line 16, in <module>
    from twisted.conch.ssh import keys
  File "/usr/lib/python2.7/dist-packages/twisted/conch/ssh/keys.py", line 20, in <module>
    from pyasn1.type import univ
exceptions.ImportError: No module named pyasn1.type

Failed to load application: No module named pyasn1.type

The solution was easy, but took me some minutes to look for the error. Actually I had none, but somehow pyasn1 was broken (?). Reinstalling helped (apt-get install –reinstall python-pyasn1):


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 51,4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ftp.debian.org/debian/ wheezy/main python-pyasn1 all 0.1.3-1 [51,4 kB]
Fetched 51,4 kB in 0s (363 kB/s)   
(Reading database ... 70005 files and directories currently installed.)
Preparing to replace python-pyasn1 0.1.3-1 (using .../python-pyasn1_0.1.3-1_all.deb) ...
Unpacking replacement python-pyasn1 ...
Setting up python-pyasn1 (0.1.3-1) ...