Open luismasuelli opened 1 month ago
In fact, let's get rid of any complexity.
from mt5linux import MetaTrader5
mt5 = MetaTrader5(host='127.0.0.1',port=8001)
mt5.initialize()
Either the same will happen or instead this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/config/.local/lib/python3.9/site-packages/mt5linux/__init__.py", line 464, in initialize
return self.__conn.eval(code)
File "/config/.local/lib/python3.9/site-packages/rpyc/core/netref.py", line 240, in __call__
return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
File "/config/.local/lib/python3.9/site-packages/rpyc/core/netref.py", line 63, in syncreq
return conn.sync_request(handler, proxy, *args)
File "/config/.local/lib/python3.9/site-packages/rpyc/core/protocol.py", line 473, in sync_request
return self.async_request(handler, *args, timeout=timeout).value
File "/config/.local/lib/python3.9/site-packages/rpyc/core/async_.py", line 100, in value
self.wait()
File "/config/.local/lib/python3.9/site-packages/rpyc/core/async_.py", line 49, in wait
raise AsyncResultTimeout("result expired")
TimeoutError: result expired
same here
Steps to reproduce:
my-compose-file.yml
):This is the code I try in Python (in my host machine).
Result:
mt5.initialize()
returnsFalse
after a long time, and nothing is initialized.mt5.last_error()
returns(-10005, "IPC timeout")
.mt5.version()
returns an empty result.I expect:
Everything to work fine.