ranaroussi / ezibpy

ezIBpy, a Pythonic Client for Interactive Brokers API
Apache License 2.0
324 stars 116 forks source link

Simple TypeError fixes. #16

Closed twopirllc closed 7 years ago

twopirllc commented 7 years ago

Hello Ran,

Uncovered these two TypeErrors in your ezibpy.py module. Not deal breakers obviously. Just digging into qtpylib API.

File "/Users/KJ/Programming/Python/qtpylib/env/lib/python3.4/site- packages/ezibpy/ezibpy.py", line 157, in log_msg if hasattr("contract", logmsg): TypeError: hasattr(): attribute name must be string

ezibpy.py line 157: #if hasattr("contract", logmsg): if hasattr("contract", str(logmsg)):

and

line 312: #self.log_msg("server", msg) self.log_msg("server", str(msg))

Thanks KJ

ranaroussi commented 7 years ago

My bad. fixed now. Please upgrade ;)