fvmt / quickfix-python-sample

Sample python quickfix venue and trader applications.
GNU General Public License v3.0
31 stars 19 forks source link

AttributeError: 'Application' object has no attribute 'sessionID' #1

Open sonicsleuth opened 6 years ago

sonicsleuth commented 6 years ago

I am attempting to implement the client.py script as part of a Python3 build. I am getting a repeated error which seems to crash python on occasion. I have tried running this inside/outside of pipenv for containment. I am using FIX Spec 4.2.

It seems the issue is with the following line from the put_order() method.

fix.Session.sendToTarget(trade, self.sessionID)

The error is as follows...

raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
AttributeError: 'Application' object has no attribute 'sessionID'
Segmentation fault: 11

Any thoughts on this? Thanks in advance.

smorrel1 commented 5 years ago

Hi - had the same error after changing input = '1' # input() So onLogon didn't have time to run. Fixed with time.sleep(0.001) before the while