[Twisted-Python] Twisted plugins and py2exe

Jean-Paul Calderone exarkun at divmod.com
Tue Feb 24 08:15:18 MST 2009


On Tue, 24 Feb 2009 11:49:13 +0100, Gabriel Rossetti <gabriel.rossetti at arimaz.com> wrote:
>Hello everyone!
>
>I used py2exe on a Twisted app of mine and I get this exception :
>
>
>Traceback (most recent call last):
>  File "proj\service.pyc", line 1308, in connectionMade
>
>  File "proj\service.pyc", line 1640, in _register
>
>  File "proj\service.pyc", line 504, in loadPlugins
>
>  File "twisted\plugin.pyc", line 200, in getPlugins
>
>--- <exception caught here> ---
>  File "twisted\plugin.pyc", line 179, in getCache
>
>exceptions.AttributeError: ZipPath instance has no attribute 'setContent'
>
>Has anyone ever had this problem while using plugins with Twisted and 
>py2exe?

No, but from the traceback, it seems fairly clear that the plugin system
is trying to write a plugin cache file into your py2exe-created zip file
of Python source.  This won't work, of course.  You could try making sure
the cache file is up to date and including it in the zip file, but I have
no idea if this will actually produce sensible behavior.  The other
possibility is to actually teach the plugin system about zip files (ie,
contribute a patch to Twisted to support this case).

Jean-Paul




More information about the Twisted-Python mailing list