FXCMPY not connecting

Hi All

Ive previously used FXCMPY and it seems that it is no longer working for me, is this a common issue, i have seen 1 post on stack exchange for same in the last 21hrs.

with a fresh venv with python 3.6 and fxcmpy only
import fxcmpy as fx
TOKEN = ‘secret’
con = fx.fxcmpy(access_token=TOKEN, log_level=‘error’, server=‘demo’)

returns :
|ERROR|2020-01-12 14:25:39,601|Socket returns unknown error.
Traceback (most recent call last):
File “”, line 1, in
File “/home/amimai/PycharmProjects/untitled/venv/lib/python3.6/site-packages/fxcmpy/fxcmpy.py”, line 217, in init
raise ServerError(‘Can not connect to FXCM Server.’)
fxcmpy.fxcmpy.ServerError: Can not connect to FXCM Server.

1 Like

PUSH:
I am experiencing the same proplem also since a few days, it is definetly not caused by a wrong or expired demo-token. (I generated a few new once which ale raised the same error)

Ok, so in case anyone is facing similar issues… after some chatting with fxcm support I think I know how to fix this…
Apperantly there was a new release of the pythonwrapper on the 12th of Januar. In order to get your setup work again you will need to upgrade to the latest SocketIo framework (pip or pip3):
pip install python-socketio

furthermore you should try to get the newest fxcmpy via pip… I had some trouble updating so I used the pip uninstall and pip install commands to do a full reinstallation, which worked for me.
Happy coding :wink: