I am using a pb client and a pb server. My client uses the twisted's
qtreactor. Since twisted 2.0, modal dialogs causes "connection lost" and
I couldn't overcome this problem for months. I tested this behaviour in
twisted 1.3, 2.0, 2.1 and finally 2.2.
When I use twisted 1.3, no problem occurs, the other versions all causes
the same error. I am posting the traceback and a small sample server and
a qt client which imitates the problem I have.
Any help is greatly appreciated.
Thanks,
Musti
--------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 294, in _startRunCallbacks
self._runCallbacks()
File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 307, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "qttestclient.py", line 39, in success
return self.openModalDialog(None)
File "qttestclient.py", line 56, in openModalDialog
return dialog.exec_loop()
--- <exception caught here> ---
File "/usr/lib/python2.4/site-packages/twisted/internet/qtreactor.py",
line 60, in read
why = w.doRead()
File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line
349, in doRead
return self.protocol.dataReceived(data)
File "/usr/lib/python2.4/site-packages/twisted/spread/banana.py", line
173, in dataReceived
gotItem(self.incomingVocabulary[num])
File "/usr/lib/python2.4/site-packages/twisted/spread/banana.py", line
114, in gotItem
self.callExpressionReceived(item)
File "/usr/lib/python2.4/site-packages/twisted/spread/banana.py", line
81, in callExpressionReceived
self.expressionReceived(obj)
File "/usr/lib/python2.4/site-packages/twisted/spread/pb.py", line
567, in expressionReceived
raise ProtocolError("Non-list expression received.")
twisted.spread.pb.ProtocolError: Non-list expression received.
error received: [Failure instance: Traceback (failure with no frames):
twisted.spread.pb.PBConnectionLost: [Failure instance: Traceback
(failure with no frames): twisted.spread.pb.ProtocolError: Non-list
expression received.
]
]
Lost: Non-list expression received.