[Twisted-Python] Twisted Trial

Gerrat Rickert grickert at coldstorage.com
Wed Jun 24 09:00:40 EDT 2009

>-----Original Message-----
>From: glyph at divmod.com [mailto:glyph at divmod.com]
>Sent: Tuesday, June 23, 2009 12:27 PM
>To: Twisted general discussion
>Subject: Re: [Twisted-Python] Twisted Trial
>On 01:42 pm, grickert at coldstorage.com wrote:
>>  File "c:\python25\lib\site-packages\twisted\plugins\testplugin.py",
>>line 12, in <module>
>>    from twisted.plugin import IPlugin, ITestPlugin, ITestPlugin2
>>exceptions.ImportError: cannot import name ITestPlugin
>>  ExampleTestCase
>>    test_example ...
>>PASSED (successes=1)
>>Could someone point out what I am doing wrong (or is this traceback
>>(I found some post on the web about a possible cause being invalid .pyc
>>files left over from a previous twisted install, so I deleted all .pyc
>>files under site-packages\twisted - but still get this traceback)
>Your problem is that you've installed two versions of Twisted using
>setup.py install, without removing Twisted in between.  This means you
>have an old plugin lying around which is trying to import some things
>that no longer exist in "twisted.plugin".
>The traceback is mostly harmless, but you should really re-install
>Twisted from scratch so that you don't experience other issues related
>to this, such as spurious test failures.
>In general I would not recommend using 'setup.py' to install to site-
>packages directly, because of problems like this; you should use a tool
>like Combinator[1] or virtualenv[2] to manage your development
>1: http://www.divmod.org/trac/wiki/DivmodCombinator
>2: http://pypi.python.org/pypi/virtualenv

Thanks, Glyph.  

Uninstalling previous versions, then reinstalling Twisted fixed it.
I'll check out those tools.

More information about the Twisted-Python mailing list