Opened 9 years ago

Closed 6 years ago

#1336 defect closed fixed (fixed)

trial ImportErrors in loadReporters when subpackages not installed

Reported by: acapnotic Owned by: acapnotic
Priority: high Milestone:
Component: core Keywords:
Cc: exarkun, spiv, acapnotic, itamarst, jml Branch:
Author: Launchpad Bug:

Description


Change History (5)

comment:1 Changed 9 years ago by acapnotic

Traceback (most recent call last):
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 520, in run
    config = Options()
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 133, in __init__
    self._loadReporters()
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 138, in
_loadReporters
    for p in plugin.getPlugins(itrial.IReporter):
  File "/home/kevint/lib/python/twisted/plugin.py", line 210, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/home/kevint/lib/python/twisted/plugin.py", line 166, in getCache
    provider = namedAny(module.__name__ + '.' + moduleName)
  File "/home/kevint/lib/python/twisted/python/reflect.py", line 361, in namedAny
    topLevelPackage = __import__(trialname)
  File "/usr/lib/python2.4/site-packages/twisted/plugins/twisted_words.py", line
12, in ?
    from twisted.words import botbot
exceptions.ImportError: No module named words
Traceback (most recent call last):
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 520, in run
    config = Options()
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 133, in __init__
    self._loadReporters()
  File "/home/kevint/lib/python/twisted/scripts/trial.py", line 138, in
_loadReporters
    for p in plugin.getPlugins(itrial.IReporter):
  File "/home/kevint/lib/python/twisted/plugin.py", line 210, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/home/kevint/lib/python/twisted/plugin.py", line 166, in getCache
    provider = namedAny(module.__name__ + '.' + moduleName)
  File "/home/kevint/lib/python/twisted/python/reflect.py", line 361, in namedAny
    topLevelPackage = __import__(trialname)
  File "/usr/lib/python2.4/site-packages/twisted/plugins/twisted_lore.py", line
5, in ?
    from twisted.lore.scripts.lore import IProcessor
exceptions.ImportError: No module named lore.scripts.lore

comment:2 Changed 9 years ago by exarkun

Notice half the paths are from /home/kevint/lib/python/ and the other half are
from /usr/lib/python2.4/site-packages/.  The plugin system traverses sys.path to
discover plugins: if a twisted package is present at two locations in sys.path,
plugins will be found from each.  If the twisted package present in the first
location in sys.path is missing modules expected by the twisted package present
in the second location in sys.path, import errors will follow.

comment:3 Changed 9 years ago by exarkun

I think this can be closed?  It seems to have been a deployment configuration
problem.

comment:4 Changed 9 years ago by acapnotic

The deployment was "setup.py install --home $HOME".  There was probably
system-wide Debian twisted install as well.  That should not be a problematic
deployment.

comment:5 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

This was due to #2339, which is now fixed.

Note: See TracTickets for help on using tickets.