>-----Original Message----- >From: gl...@divmod.com [mailto:gl...@divmod.com] >Sent: Tuesday, June 23, 2009 12:27 PM >To: Twisted general discussion >Subject: Re: [Twisted-Python] Twisted Trial > > >(snip) > >On 01:42 pm, grick...@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 >>test_example >> ExampleTestCase >> test_example ... >>[OK] > >>PASSED (successes=1) >> >>Could someone point out what I am doing wrong (or is this traceback >>"Normal")? >>(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 >dependencies. > >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. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python