N
nobody
Hi,
I have a class ClientHandler(asyncore.dispatcher_with_send), it was runningfine without calling any of my own classes. But it got following exceptionwhen I called my own class GetMyResponse inside the def handle_read(self).Not sure why it causes disturbance to asyncore.dispatcher_with_send __init__ when calling an extra class? Appreciate any clues and tips.
class GetMyResponse:
def __init__(self, message):
....
class ClientHandler(asyncore.dispatcher_with_send):
def handle_read(self):
....
handleResponse = GetMyResponse(data)
self.send(handleResponse.getResponse())
error: uncaptured python exception, closing channel <__main__.ClientHandlerconnected 127.0.0.1:42383 at 0x7f3b638b6758> (<type 'exceptions.TypeError'>:__init__() takes exactly 4 arguments (3 given) [/usr/lib64/python2.6/asyncore.py|read|78] [/usr/lib64/python2.6/asyncore.py|handle_read_event|428]
I have a class ClientHandler(asyncore.dispatcher_with_send), it was runningfine without calling any of my own classes. But it got following exceptionwhen I called my own class GetMyResponse inside the def handle_read(self).Not sure why it causes disturbance to asyncore.dispatcher_with_send __init__ when calling an extra class? Appreciate any clues and tips.
class GetMyResponse:
def __init__(self, message):
....
class ClientHandler(asyncore.dispatcher_with_send):
def handle_read(self):
....
handleResponse = GetMyResponse(data)
self.send(handleResponse.getResponse())
error: uncaptured python exception, closing channel <__main__.ClientHandlerconnected 127.0.0.1:42383 at 0x7f3b638b6758> (<type 'exceptions.TypeError'>:__init__() takes exactly 4 arguments (3 given) [/usr/lib64/python2.6/asyncore.py|read|78] [/usr/lib64/python2.6/asyncore.py|handle_read_event|428]