Komnomnomnom / swigibpy

Third party Interactive Brokers Python API generated from TWS C++ API using SWIG.
http://github.com/Komnomnomnom/swigibpy/
Other
155 stars 36 forks source link

Missing method argument #31

Closed SleepingPills closed 9 years ago

SleepingPills commented 9 years ago

On line 2017 in swigibpy.py, the eConnect method does not have an extraAuth argument yet it tries to use a variable with that name. The result is that it fails at run time:

def eConnect(self, host, port, clientId=0, poll_auto=True):
     val = _swigibpy.EPosixClientSocket_eConnect(self, host, port, clientId, extraAuth)
     if poll_auto and val:
         self.poller = TWSPoller(self)
         self.poller.start()
     return val
SleepingPills commented 9 years ago

Just some extra info: adding the parameter manually to the file fixes the issue, but I'm surprised swig does not generate valid code to begin with.

Komnomnomnom commented 9 years ago

The fault lies in the SWIG interface file, that method is shadowed to support the poll_auto param. Fixed in 4c66de4c1c28f271e7135913d8ec9f61a1c69191. Please try this out and re-open if there are still issues.