python3.3 throws apport exception on each traceback

Bug #1059017 reported by Julian Taylor
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Blender
Unknown
Unknown
apport (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

the python3.3 interactive interpreter throws apport exceptions on each traceback, python 3.2 is not affected.

>>> 1//0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, 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 20, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
    import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>>

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: python3-apport 2.5.3-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportLog:

ApportVersion: 2.5.3-0ubuntu1
Architecture: amd64
Date: Sun Sep 30 14:09:31 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120824)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Julian Taylor (jtaylor) wrote :
Revision history for this message
Julian Taylor (jtaylor) wrote :

the underlying reason is that extensions aren't built for python3.3
but that won't change so apport should get a workaround

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This is because in Quantal, none of the Python extensions work for Python 3.3. This now works in Raring, but is not something we can/want to fix in Quantal.

Changed in apport (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
IRIE Shinsuke (irie) wrote :

This bug messes up Blender's Python console. Once the error happens, the console doesn't work at all.

no longer affects: apport
Revision history for this message
ideasman42 (ideasman42) wrote :

Could there at least be some way to disable `apport`

By setting an environment variable for eg:
APPORT_DISABLE=1

Then blender can set this (or a launcher script) and it will work fine.

Otherwise any application that uses py3.3 and has an interactive console will run into this.

Revision history for this message
IRIE Shinsuke (irie) wrote :

I think sys.excepthook shouldn't be set in sitecustomize.py if required modules such as apt_pkg don't exist.

Revision history for this message
James Shaw (hertzsprung) wrote :

Deleting /usr/lib/python3.3/sitecustomize.py worked around this for me. Is there a reason why this workaround can't be included in the package itself?

Revision history for this message
IRIE Shinsuke (irie) wrote :

I don't understand why such serious bug that messes up programs using Python will not be fixed.

Please reopen.

Revision history for this message
Padraig Looney (padraig-looney) wrote :

This bug prevents me from being able to develop on Ubuntu.

I agree with the three comments above. Removing /usr/lib/python3.3/sitecustomize.py fixed it for me but should I be doing that?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.