I just tried to use the Python module twisted.internet
for an XBMC add-on that I am currently writing. When I tried to execute my add-on, I got an exception that I could not understand. I was quite suprised when I noticed that the following lines were causing all the troubles:
import xbmc, xbmcgui, xbmcaddon # Can be removed; doesn't change anything.
from twisted.internet import reactor, defer
Question: How can I use twisted
for the development of my XBMC add-on? Any help would be appreciated!
Unfortunately, I am new to both, XBMC and twisted
and there are little more details that I can provide. I think that the addon is not executed in the main thread. I am using XBMC 11 for testing at the moment. (Update: I am using the most recent Debian testing packages of XBMC, Python and twisted
. Importing and using the module works from regular scripts and from an XBMC service, but not from XBMC scripts.) The stacktrace from the xbmc.log
file is:
File "/home/markus/.xbmc/addons/script.marmay.wol/timewol.py", line 2, in <module>
from twisted.internet import reactor, defer
File "/usr/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 37, in <module>
from twisted.internet import default
File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 50, in <module>
install = _getInstallFunction(platform)
File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.pollreactor import install
File "/usr/lib/python2.7/dist-packages/twisted/internet/pollreactor.py", line 19, in <module>
from zope.interface import implements
File "/usr/lib/python2.7/dist-packages/zope/interface/__init__.py", line 58, in <module>
_wire()
File "/usr/lib/python2.7/dist-packages/zope/interface/interface.py", line 805, in _wire
classImplements(Attribute, IAttribute)
File "/usr/lib/python2.7/dist-packages/zope/interface/declarations.py", line 447, in classImplements
spec = implementedBy(cls)
File "/usr/lib/python2.7/dist-packages/zope/interface/declarations.py", line 318, in implementedByFallback
if isinstance(spec, Implements):
TypeError: 'NoneType' object is not callable
This is the first relevant error message.
Thanks for your help!