twisted / nevow

Web Application Construction Kit
Other
63 stars 32 forks source link

Installing python-nevow breaks twisted trial #4

Closed nevow-migration closed 10 years ago

nevow-migration commented 10 years ago

After installing python-nevow, the "trial" test utility provided by python-twisted-core fails with the following error message:

Traceback (most recent call last): File "/usr/bin/trial", line 23, in from twisted.scripts.trial import run ImportError: No module named scripts.trial

Investigation reveals that the culprit is an empty "init.py" file generated by the nevow installation. This file is placed in /var/lib/python-support/python2.5/twisted/plugins. The existence of that file breaks twisted's plugin finding approach and causes it to fail to find the twisted.scripts package, which is actually located at /usr/share/pyshared/twisted/scripts.

I can't see how this file gets generated

Source package: nevow Ubuntu release: Ubuntu 8.04.3 LTS Package versions: python-nevow: 0.9.26-1, python-twisted-core: 2.5.0-2build2, python2.5: 2.5.2-2ubuntu6


Imported from Launchpad using lp2gh.

nevow-migration commented 10 years ago

(by feranick) Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in nevow.

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

nevow-migration commented 10 years ago

(by zooko) According to http://allmydata.org/pipermail/tahoe-dev/2009-August/002551.html this situation with the bogus init.py file doesn't cause a problem as long as the correct "twisted" directory appears earlier on the PYTHONPATH.

My own personal experience with this bug required me to run "sudo /bin/rm /var/lib/python-support/python2.5/twisted/init.py" in order to work-around the problem. The same situation arose for a couple of other users of the Tahoe-LAFS app (which uses Twisted and Nevow).

nevow-migration commented 10 years ago

(by zooko) I may have confused the issue originally reported by Shawn Willden with this issue that I experience in Tahoe-LAFS: http://allmydata.org/trac/tahoe/ticket/806 .

Shawn reported that he traced the problem to an empty init.py file that is written into /var/lib/python-support/python2.5/twisted/plugins . But Tahoe-LAFS's problem is that an empty init.py is written into /var/lib/python-support/python2.5/twisted/init.py . I'm not entirely sure that it was the installation of nevow that did it, either. Are these two manifestations of the same problem, or two different problems?

See also http://article.gmane.org/gmane.comp.python.distutils.devel/7409 in which Josselin Mouette <joss debian.org> seems to say that Twisted and/or Nevow should change the way they do things to avoid this bug. Is this bug in one of those awful "stalemates" that arise in open source where two different developers each refuse to change the way they do things, with the result that users who want to use both open source tools together have to work-around the breakage?

nevow-migration commented 10 years ago

(by kitterman) Should be fixed in nevow (0.10.0-1) unstable; urgency=low.

nevow-migration commented 10 years ago

(by zooko) Scott: do you remember what the fix was that went into nevow 0.10.0-1? I'm working with a user who has a similar problem -- they have the python-twisted-web package installed in Lucid, but "import twisted.web" gets an import error after getting twisted from /usr/lib/python2.6/dist-packages/twisted/init.py. There are symlinks in /usr/lib/python2.6/dist-packages/twisted/ pointing to pyshared for some of the things that live in the namespace "twisted" but not for "web". We haven't yet fully narrowed down whether this is a bug in Ubuntu itself or if we manually edited part of the system or what. It might help if we knew what the change was in nevow that (presumably) should still be present in the Lucid version of nevow. Thanks!

nevow-migration commented 10 years ago

(by kitterman) Not sure. Maybe http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521663 ?

"Zooko O'Whielacronx"

Scott: do you remember what the fix was that went into nevow 0.10.0-1? I'm working with a user who has a similar problem -- they have the python-twisted-web package installed in Lucid, but "import twisted.web" gets an import error after getting twisted from /usr/lib/python2.6/dist- packages/twisted/init.py. There are symlinks in /usr/lib/python2.6 /dist-packages/twisted/ pointing to pyshared for some of the things that live in the namespace "twisted" but not for "web". We haven't yet fully narrowed down whether this is a bug in Ubuntu itself or if we manually edited part of the system or what. It might help if we knew what the change was in nevow that (presumably) should still be present in the Lucid version of nevow. Thanks!

You received this bug notification because you are a direct subscriber of the bug. https://bugs.launchpad.net/bugs/410098

Title: Installing python-nevow breaks twisted trial

Status in Divmod Nevow: New Status in Tahoe, the Lovely Accessible File System: New Status in “nevow” package in Ubuntu: Fix Released

Bug description: After installing python-nevow, the "trial" test utility provided by python-twisted-core fails with the following error message:

Traceback (most recent call last): File "/usr/bin/trial", line 23, in from twisted.scripts.trial import run ImportError: No module named scripts.trial

Investigation reveals that the culprit is an empty "init.py" file generated by the nevow installation. This file is placed in /var/lib/python-support/python2.5/twisted/plugins. The existence of that file breaks twisted's plugin finding approach and causes it to fail to find the twisted.scripts package, which is actually located at /usr/share/pyshared/twisted/scripts.

I can't see how this file gets generated

Source package: nevow Ubuntu release: Ubuntu 8.04.3 LTS Package versions: python-nevow: 0.9.26-1, python-twisted-core: 2.5.0-2build2, python2.5: 2.5.2-2ubuntu6

To unsubscribe from this bug, go to: https://bugs.launchpad.net/nevow/+bug/410098/+subscribe

nevow-migration commented 10 years ago

(by exarkun) Only an Ubuntu packaging bug, as far as I can tell.

nevow-migration commented 10 years ago

(by daira) Zooko: the bug is explained in http://thread.gmane.org/gmane.comp.python.distutils.devel/7363/focus=7409 .

nevow-migration commented 10 years ago

(by daira) ... and I don't think it is the same bug as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521663 .