da4089 / simplefix

Simple FIX protocol implementation for Python
MIT License
229 stars 63 forks source link

AttributeError: module 'simplefix' has no attribute 'Message' #29

Closed irmscher9 closed 3 years ago

irmscher9 commented 3 years ago

import simplefix

fix_msg = simplefix.Message()

_Traceback (most recent call last): File "C:/Users/irmsc/pp/simple_fix_test/main.py", line 3, in fixmsg = simplefix.Message() AttributeError: module 'simplefix' has no attribute 'Message'

da4089 commented 3 years ago

The message class is actually called "FixMessage", so the line above should be "fix_msg = simplefix.FixMessage()".

Do you copy that line from somewhere? I'd like to fix that mistake in any documentation, or wherever.

irmscher9 commented 3 years ago

The message class is actually called "FixMessage", so the line above should be "fix_msg = simplefix.FixMessage()".

Do you copy that line from somewhere? I'd like to fix that mistake in any documentation, or wherever.

Yes, from here: https://simplefix.readthedocs.io/en/latest/import.html

vargaspazdaniel commented 3 years ago

I have the same error, I just installed the package, made the import and try to set fix_msg = simplefix.Message() But I'm getting an error about AttributeError: module 'simplefix' has no attribute 'Message'

da4089 commented 3 years ago

I've pushed the latest documentation to readthedocs, which corrects this. The message class is "FixMessage", not "Message".