Inherent asyncore.dispatcher_with_send exception

Discussion in 'Python' started by nobody, Jan 25, 2013.

  1. nobody

    nobody Guest

    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]
     
    nobody, Jan 25, 2013
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Web Developer

    C++: inherent conflict

    Web Developer, Jul 31, 2003, in forum: C++
    Replies:
    12
    Views:
    813
    Web Developer
    Aug 4, 2003
  2. Michael Welsh

    asyncore asynchat

    Michael Welsh, Jul 15, 2003, in forum: Python
    Replies:
    0
    Views:
    691
    Michael Welsh
    Jul 15, 2003
  3. Garth
    Replies:
    0
    Views:
    499
    Garth
    Jul 24, 2003
  4. Freddie
    Replies:
    2
    Views:
    487
    Freddie
    Jul 8, 2004
  5. Victor Norman
    Replies:
    1
    Views:
    466
    Josiah Carlson
    Oct 8, 2004
  6. Frederick Gotham

    Inherent inefficiency in domestic "for" loop?

    Frederick Gotham, Jun 26, 2006, in forum: C Programming
    Replies:
    34
    Views:
    968
  7. johkar
    Replies:
    2
    Views:
    1,036
    johkar
    May 29, 2009
  8. Zhenning Guan

    a inherent class, how to write?

    Zhenning Guan, Jul 10, 2009, in forum: Ruby
    Replies:
    2
    Views:
    224
    David A. Black
    Jul 10, 2009
Loading...