[Bug 1631367] [NEW] Error in sys.excepthook: ModuleNotFoundError: No module named 'apt_pkg'

graingert tagrain at gmail.com
Fri Oct 7 13:20:08 UTC 2016


Public bug reported:

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/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

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
ProcVersionSignature: Ubuntu 4.8.0-17.19-generic 4.8.0-rc7
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)

** Affects: python3.6 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug yakkety

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1631367

Title:
  Error in sys.excepthook: ModuleNotFoundError: No module named
  'apt_pkg'

Status in python3.6 package in Ubuntu:
  New

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/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
    File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
      from apport.report import Report
    File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
      import apport.fileutils
    File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
      from apport.packaging_impl import impl as packaging
    File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
      import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  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
  ProcVersionSignature: Ubuntu 4.8.0-17.19-generic 4.8.0-rc7
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.6/+bug/1631367/+subscriptions



More information about the foundations-bugs mailing list