[Twisted-Python] QtReactor problem with Modal Dialogs (Twisted 2.x)

Mustafa Sakalsiz mustafa at liqia.com
Thu Mar 2 06:43:30 MST 2006


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qttestclient.py
Type: application/x-python
Size: 1897 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20060302/4ecf66f7/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testserver.py
Type: application/x-python
Size: 1034 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20060302/4ecf66f7/attachment-0005.bin>


More information about the Twisted-Python mailing list