Skip to content

Error handling itself raises a TypeError due to wrong # of arguments (overloading appears not to be working) #13

Description

@GoogleCodeExporter
when i try to place an invalid order via placeOrder, IbPy attempts to send me 
an EClientErrors.FAIL_SEND_ORDER but fails; the attempt to send the error 
itself has an error.

i get:


error trace:

(parts of the error trace in my application code omitted except for this first 
bit at line 789:)

--> 789         self._ib.placeOrder(self._increment_nextValidOrderId, contract, 
order.makeIbOrder())
    790 
    791 

/usr/local/lib/python2.7/dist-packages/ib/opt/sender.pyc in wrapperMethod(*args)
     69             def wrapperMethod(*args):
     70                 self.dispatcher(name+'Before', dict(zip(before.__slots__, args)))
---> 71                 result = value(*args)
     72                 self.dispatcher(name+'After', dict(zip(after.__slots__, args)))
     73                 return result

/usr/local/lib/python2.7/dist-packages/ib/lib/__init__.pyc in inner(*args, 
**kwds)
     43             lock.acquire()
     44             try:
---> 45                 return func(*args, **kwds)
     46             finally:
     47                 lock.release()

/usr/local/lib/python2.7/dist-packages/ib/ext/EClientSocket.pyc in 
placeOrder(self, id, contract, order)
    775                 self.send(order.m_whatIf)
    776         except (Exception, ), e:
--> 777             self.error(id, EClientErrors.FAIL_SEND_ORDER, str(e))
    778             self.close()
    779 

/usr/local/lib/python2.7/dist-packages/ib/lib/overloading.pyc in __call__(self, 
*args)
     80         if func is None:
     81             self.cache[types] = func = self.find_func(types)
---> 82         return func(*args)
     83 
     84     def find_func(self, types):

/usr/local/lib/python2.7/dist-packages/ib/lib/__init__.pyc in inner(*args, 
**kwds)
     43             lock.acquire()
     44             try:
---> 45                 return func(*args, **kwds)
     46             finally:
     47                 lock.release()

TypeError: error() takes exactly 2 arguments (4 given)

Original issue reported on code.google.com by bshanks....@gmail.com on 22 Dec 2011 at 5:52

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions