Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data socket timeout ERROR MT5 DOCKER AND WINDOWS #10

Closed
DiMiTriFrog opened this issue Aug 7, 2023 · 14 comments
Closed

Data socket timeout ERROR MT5 DOCKER AND WINDOWS #10

DiMiTriFrog opened this issue Aug 7, 2023 · 14 comments

Comments

@DiMiTriFrog
Copy link

I was using the Docker version with mac and linux fine but suddenly the library stopped working. I thought that was the time to get Windows VPS so i now i have already installed all needed bu i'm having the same error.

Code i'm running:

from ejtraderMT import Metatrader
api = Metatrader()

ERROR WINDOWS:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 71, in _pull_reply
msg = self.sys_socket.recv_json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\zmq\sugar\socket.py", line 1009, in recv_json
msg = self.recv(flags)
^^^^^^^^^^^^^^^^
File "zmq\backend\cython\socket.pyx", line 805, in zmq.backend.cython.socket.Socket.recv
File "zmq\backend\cython\socket.pyx", line 841, in zmq.backend.cython.socket.Socket.recv
File "zmq\backend\cython\socket.pyx", line 199, in zmq.backend.cython.socket._recv_copy
File "zmq\backend\cython\socket.pyx", line 194, in zmq.backend.cython.socket._recv_copy
File "zmq\backend\cython\checkrc.pxd", line 22, in zmq.backend.cython.checkrc._check_rc
zmq.error.Again: Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\met.py", line 3, in
api = Metatrader()
^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 138, in init
self.__utc_brocker_offset = self.___utc_brocker_offset()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 407, in ___utc_brocker_offset
broker = self.accountInfo()
^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 279, in accountInfo
return self.__api.Command(action="ACCOUNT")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 113, in Command
return self._pull_reply()
^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\ejtraderMT\api\mql.py", line 73, in _pull_reply
raise zmq.NotDone("Data socket timeout ERROR")
zmq.error.NotDone: Data socket timeout ERROR

@DiMiTriFrog
Copy link
Author

I want to add that using MetaTrader5 library i can connect it and work with it, but its a bullshit lib, i prefer yours.

@DiMiTriFrog
Copy link
Author

In addition, i'm not able to build the ejtrader Expert into Metatrader... there is warnings and errors previous to build.

Could you help me?? I'm so interested in try it.

@traderpedroso

@DiMiTriFrog
Copy link
Author

Screenshot 2023-08-11 at 12 13 33

@traderpedroso
Copy link
Member

docker pull for the last version or clone the repository of MT5 DOCKER

@DiMiTriFrog
Copy link
Author

docker pull for the last version or clone the repository of MT5 DOCKER

i tried and worked, but suddenly let works, so i'm trying to install from zero

@traderpedroso
Copy link
Member

docker pull for the last version or clone the repository of MT5 DOCKER

i tried and worked, but suddenly let works, so i'm trying to install from zero

make sure to pip install ejtraderMT -U to install the last version of the library

@DiMiTriFrog
Copy link
Author

Yes i did, but same.. :(

@makovez
Copy link

makovez commented Sep 23, 2023

I have same problem here:

(py311) MetaTrader5:~# python
Python 3.11.5 (main, Aug 26 2023, 10:26:28) [GCC 13.1.1 20230722] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ejtraderMT import Metatrader

>>> 
>>> api = Metatrader()
/root/py311/lib/python3.11/site-packages/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC.
  warnings.warn('Can not find any timezone configuration, defaulting to UTC.')
Traceback (most recent call last):
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 71, in _pull_reply
    msg = self.sys_socket.recv_json()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/py311/lib/python3.11/site-packages/zmq/sugar/socket.py", line 1009, in recv_json
    msg = self.recv(flags)
          ^^^^^^^^^^^^^^^^
  File "zmq/backend/cython/socket.pyx", line 805, in zmq.backend.cython.socket.Socket.recv
  File "zmq/backend/cython/socket.pyx", line 841, in zmq.backend.cython.socket.Socket.recv
  File "zmq/backend/cython/socket.pyx", line 199, in zmq.backend.cython.socket._recv_copy
  File "zmq/backend/cython/socket.pyx", line 194, in zmq.backend.cython.socket._recv_copy
  File "zmq/backend/cython/checkrc.pxd", line 22, in zmq.backend.cython.checkrc._check_rc
zmq.error.Again: Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 138, in __init__
    self.__utc_brocker_offset = self.___utc_brocker_offset()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 407, in ___utc_brocker_offset
    broker = self.accountInfo()
             ^^^^^^^^^^^^^^^^^^
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 279, in accountInfo
    return self.__api.Command(action="ACCOUNT")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 113, in Command
    return self._pull_reply()
           ^^^^^^^^^^^^^^^^^^
  File "/root/py311/lib/python3.11/site-packages/ejtraderMT/api/mql.py", line 73, in _pull_reply
    raise zmq.NotDone("Data socket timeout ERROR")
zmq.error.NotDone: Data socket timeout ERROR

@DiMiTriFrog
Copy link
Author

i'm think the issue is because the broker we are using does not allow the version of metatrader is using on the Docker.
I put an issue here ejtraderLabs/Metatrader5-Docker#6 asking for an update!

@makovez
Copy link

makovez commented Sep 24, 2023

i'm think the issue is because the broker we are using does not allow the version of metatrader is using on the Docker.
I put an issue here ejtraderLabs/Metatrader5-Docker#6 asking for an update!

No cause I'm not even logged in, I just try to initialize that class Metatrader().

I can't even find the server for my broker which is tick mill from the GUI.

@DiMiTriFrog
Copy link
Author

i'm think the issue is because the broker we are using does not allow the version of metatrader is using on the Docker.
I put an issue here ejtraderLabs/Metatrader5-Docker#6 asking for an update!

No cause I'm not even logged in, I just try to initialize that class Metatrader().

I can't even find the server for my broker which is tick mill from the GUI.

what server is?

@makovez
Copy link

makovez commented Sep 24, 2023

Should be this demo.mt5tickmill.com

But in my terminal on my windows installation I just select tick mill eu demo.

@DiMiTriFrog
Copy link
Author

Wtf... But if you are using Windows, you are using metatrader for windows, not using Docker, right?

So you have to install the plugin of EJTrader in your metamask to allow connect using python sockets

@makovez
Copy link

makovez commented Sep 24, 2023

I'm saying in my windows regular installation of mt5 I can see the tickmill server but in the docker one from this repo I can't see it.

I wonder if I can change the terminal.exe with mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants