Thanks, Phil. <br><br>I tried this and now I get a different error which I'm not sure what to do with:<br><br>Traceback (most recent call last):<br> File "twisted_help.py", line 186, in <module><br> reactor.run()<br>
File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 220,<br>in run<br> self.mainLoop()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 228,<br>in mainLoop<br>
self.runUntilCurrent()<br>--- <exception caught here> ---<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561, in ru<br>nUntilCurrent<br> call.func(*call.args, **<a href="http://call.kw">call.kw</a>)<br>
File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411, in _c<br>ontinueSystemEvent<br> for callList in sysEvtTriggers[1], sysEvtTriggers[2]:<br>exceptions.TypeError: 'NoneType' object is unsubscriptable<br>
Traceback (most recent call last):<br> File "twisted_help.py", line 186, in <module><br> reactor.run()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 220,<br>in run<br>
self.mainLoop()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 228,<br>in mainLoop<br> self.runUntilCurrent()<br>--- <exception caught here> ---<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561, in ru<br>
nUntilCurrent<br> call.func(*call.args, **<a href="http://call.kw">call.kw</a>)<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411, in _c<br>ontinueSystemEvent<br> for callList in sysEvtTriggers[1], sysEvtTriggers[2]:<br>
exceptions.TypeError: 'NoneType' object is unsubscriptable<br>Traceback (most recent call last):<br> File "twisted_help.py", line 186, in <module><br> reactor.run()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 220,<br>
in run<br> self.mainLoop()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 228,<br>in mainLoop<br> self.runUntilCurrent()<br>--- <exception caught here> ---<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561, in ru<br>
nUntilCurrent<br> call.func(*call.args, **<a href="http://call.kw">call.kw</a>)<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411, in _c<br>ontinueSystemEvent<br> for callList in sysEvtTriggers[1], sysEvtTriggers[2]:<br>
exceptions.TypeError: 'NoneType' object is unsubscriptable<br>Traceback (most recent call last):<br> File "twisted_help.py", line 186, in <module><br> reactor.run()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 220,<br>
in run<br> self.mainLoop()<br> File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 228,<br>in mainLoop<br> self.runUntilCurrent()<br>--- <exception caught here> ---<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 561, in ru<br>
nUntilCurrent<br> call.func(*call.args, **<a href="http://call.kw">call.kw</a>)<br> File "C:\Python25\lib\site-packages\twisted\internet\base.py", line 411, in _c<br>ontinueSystemEvent<br> for callList in sysEvtTriggers[1], sysEvtTriggers[2]:<br>
exceptions.TypeError: 'NoneType' object is unsubscriptable<br><br>Do you have any ideas?<br><br>Thanks,<br><br>Don<br><br><div class="gmail_quote">On Tue, Feb 26, 2008 at 3:33 PM, Phil Mayers <<a href="mailto:p.mayers@imperial.ac.uk">p.mayers@imperial.ac.uk</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
You are creating the DeferredList before getNetworkElements has<br>
callback'ed - i.e. it's empty.<br>
<br>
Move the creation of the DeferredList (and adding it's callback) to just<br>
before the "return" in "printResult"<br>
<div class="Ih2E3d"><br>
<br>
> g = getNetworkElements().addCallback(printResult)<br>
> dl = defer.DeferredList(deferred_list, 0, 0, 1 )<br>
> print dir(dl)<br>
> dl.addCallback(exiter)<br>
><br>
> reactor.run()<br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Twisted-Python mailing list<br>
> <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
> <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>