KeyError: 'zope' repeated many times one every execution of python

Bug #851038 reported by Gediminas Paulauskas
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
zope.app.pagetemplate (Ubuntu)
Fix Released
High
Gediminas Paulauskas

Bug Description

If any python-zope.app.* package is installed, I start to get lots of errors in the terminal when starting any python program:

Selecting previously deselected package python-zope.error.
Unpacking python-zope.error (from .../python-zope.error_3.7.2-0ubuntu3_all.deb) ...
Selecting previously deselected package python-zope.app.publication.
Unpacking python-zope.app.publication (from .../python-zope.app.publication_3.13.2-0ubuntu1_all.deb) ...
Processing triggers for man-db ...
Setting up python-central (0.6.17) ...
Setting up python-setuptools (0.6.16-1) ...
Error processing line 2 of /usr/lib/python2.7/dist-packages/zope.app.pagetemplate-3.11.2-nspkg.pth:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 157, in addpackage
      exec line
    File "<string>", line 1, in <module>
  KeyError: 'zope'

Remainder of file ignored
Error processing line 2 of /usr/lib/python2.7/dist-packages/zope.app.publication-3.13.2-nspkg.pth:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 157, in addpackage
      exec line
    File "<string>", line 1, in <module>
  KeyError: 'zope'

Remainder of file ignored
Setting up python-transaction (1.1.1-0ubuntu2) ...

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

This is because zope.interface installs a zope/__init__.py file, and this breaks the .pth files.

dh_python2 now has a namespace feature, that solves this problem UNLESS a package installs it's own namespace __init__.py file.

But the new dh_python2 in oneiric solves the problem of namespace __init__.py files, and we do not need this hack any more.

Changed in zope.interface (Ubuntu):
status: New → Fix Released
importance: Undecided → High
assignee: nobody → Gediminas Paulauskas (menesis)
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

A combination of misleading error messages and claims lead me to look backwards at the problem.

I have reverted this and similar changes, and fixed this problem in the python-zope.app package.

affects: zope.interface (Ubuntu) → zope.app.pagetemplate (Ubuntu)
Changed in zope.app.pagetemplate (Ubuntu):
milestone: none → ubuntu-11.10-beta-2
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.