[PyKDE] Bizarre backtrace?
phil at river-bank.demon.co.uk
Mon Jul 1 23:29:01 BST 2002
Bill Soudan wrote:
> Hi all,
> I've been working on a client/server process monitor type application
> lately, with a plain python backend and a PyQt GUI that communicate via
> XMLRPC. I've run into a stumbling block today though that I can't quite
> figure out, I was hoping someone may be able to shed some light on it
> and/or suggest a few debugging tips, as I'm somewhat of a Python newbie.
> Here's the bizarre backtrace I'm receiving, which happens when the process
> monitor backend invokes a method in the PyQt GUI using XMLRPC:
> socket_notifier fired, calling handle_request
> Exception happened during processing of request from ('xxx.xxx.xxx.xxx',
> Traceback (most recent call last):
> File "/usr/lib/python2.2/SocketServer.py", line 221, in handle_request
> self.process_request(request, client_address)
> File "/usr/lib/python2.2/SocketServer.py", line 240, in process_request
> self.finish_request(request, client_address)
> File "/usr/lib/python2.2/SocketServer.py", line 253, in finish_request
> self.RequestHandlerClass(request, client_address, self)
> File "/usr/lib/python2.2/SocketServer.py", line 513, in __init__
> File "/usr/lib/python2.2/SocketServer.py", line 557, in setup
> self.rfile = self.connection.makefile('rb', self.rbufsize)
> AttributeError: 'str' object has no attribute 'sipThis'
> I can't for the life of me figure out why the exception is being thrown,
> and the fact it appears related to sip is especially bizarre because this
> particular bit of code really has nothing to do with PyQt or sip at all.
> The only possible conneciton is that I'm using a QSocketNotifier to tell
> me when a request is waiting on the socket. I have verified that the
> exception is in fact being thrown from that line, however, by placing
> debugging print statements in the library modules.
> Any tips? The other oddity is that this error occurs randomly, most
> requests succeed.. I'd say it happens about 25% of the time.
> Obligatory version info:
> RedHat-7.3, all components installed via rpm.
sipThis is created by the ctor of a PyQt class. Normally this error
occurs when you have sub-classed a PyQt class but forgot to call the
PyQt class __init__() from your sub-class's __init__().
More information about the PyQt