The question + answer is from 2013. I recently (2015) saw it happening again.
The problem is that ubuntu's python-apport
package installs a /usr/lib/python2.7/dist-packages/apport_python_hook.py
file that overrides sys.excepthook
. It makes sure python tracebacks are fed into ubuntu's "apport" error reporting mechanism.
That in itself is not a problem. But bootstrap.py
restricts the python path, so that the hook cannot import apport
anymore...
So if an error occurs during the bootstrap run, an exception is printed which then fails a second time because apport cannot be imported.
A solution could be to sudo apt-get remove python-apport
. That's at least what we did on the server (where having apport makes no sense in any case).