[Twisted-Python] DeferredList?

Don Smith donwsmith at gmail.com
Tue Feb 26 18:52:33 EST 2008


Thanks, Phil.

I tried this and now I get a different error which I'm not sure what to do
with:

Traceback (most recent call last):
  File "twisted_help.py", line 186, in <module>
    reactor.run()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
220,
in run
    self.mainLoop()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
228,
in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561,
in ru
nUntilCurrent
    call.func(*call.args, **call.kw)
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411,
in _c
ontinueSystemEvent
    for callList in sysEvtTriggers[1], sysEvtTriggers[2]:
exceptions.TypeError: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
  File "twisted_help.py", line 186, in <module>
    reactor.run()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
220,
in run
    self.mainLoop()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
228,
in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561,
in ru
nUntilCurrent
    call.func(*call.args, **call.kw)
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411,
in _c
ontinueSystemEvent
    for callList in sysEvtTriggers[1], sysEvtTriggers[2]:
exceptions.TypeError: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
  File "twisted_help.py", line 186, in <module>
    reactor.run()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
220,
in run
    self.mainLoop()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
228,
in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561,
in ru
nUntilCurrent
    call.func(*call.args, **call.kw)
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411,
in _c
ontinueSystemEvent
    for callList in sysEvtTriggers[1], sysEvtTriggers[2]:
exceptions.TypeError: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
  File "twisted_help.py", line 186, in <module>
    reactor.run()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
220,
in run
    self.mainLoop()
  File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line
228,
in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561,
in ru
nUntilCurrent
    call.func(*call.args, **call.kw)
  File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411,
in _c
ontinueSystemEvent
    for callList in sysEvtTriggers[1], sysEvtTriggers[2]:
exceptions.TypeError: 'NoneType' object is unsubscriptable

Do you have any ideas?

Thanks,

Don

On Tue, Feb 26, 2008 at 3:33 PM, Phil Mayers <p.mayers at imperial.ac.uk>
wrote:

>
> You are creating the DeferredList before getNetworkElements has
> callback'ed - i.e. it's empty.
>
> Move the creation of the DeferredList (and adding it's callback) to just
> before the "return" in "printResult"
>
>
> >     g = getNetworkElements().addCallback(printResult)
> >     dl = defer.DeferredList(deferred_list, 0, 0, 1 )
> >     print dir(dl)
> >     dl.addCallback(exiter)
> >
> >     reactor.run()
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Twisted-Python mailing list
> > Twisted-Python at twistedmatrix.com
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080226/b477527c/attachment.htm 


More information about the Twisted-Python mailing list