Error in sys.excepthook: ModuleNotFoundError: No module named 'apt_pkg'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3.6 (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Errors that are supposed to be handled by the except hook fail due to incompatible apt_pkg module
$ python3.6
Python 3.6.0b1 (default, Sep 17 2016, 12:08:22)
[GCC 6.2.0 20160914] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> foop
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'foop' is not defined
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/
from apport.report import Report
File "/usr/lib/
import apport.fileutils
File "/usr/lib/
from apport.
File "/usr/lib/
import apt
File "/usr/lib/
import apt_pkg
ModuleNotFoundE
Original exception was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'foop' is not defined
>>>
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: python3.6 3.6.0~b1-1ubuntu2
ProcVersionSign
Uname: Linux 4.8.0-17-generic x86_64
ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Oct 7 12:08:38 2016
InstallationDate: Installed on 2016-01-05 (275 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: python3.6
UpgradeStatus: No upgrade log present (probably fresh install)
Thanks for taking your time to report this issue and help making Ubuntu better.
I get the same error when I follow your example on Ubuntu Yakkety. I don't get a stacktrace if I attempt the same with python3.5