MachineLearningRemote-Unreal icon indicating copy to clipboard operation
MachineLearningRemote-Unreal copied to clipboard

connect async handler error

Open LTorrao opened this issue 3 years ago • 4 comments

Hello,

Very first time trying machine-learning-remote-ue4, could you please help me out?

Steps:

A)

  1. Downloaded current plugin source from GitHub (not the latest release, because UE4 4.26) and put it in the plugins folder of my project.
  2. Git cloned current socketio-client-ue4 source from GitHub (not the latest release, because UE4 4.26) and in the plugins folder of my project (ThirdParty OK).
  3. Successful compilation of the project, component has "hello" as default script.
  4. in blueprint, set hitting a key to run SendStringInput with a string to function "onJsonInput"

B)

  1. Downloaded current ml-remote-server (TF branch) source from GitHub (not the latest release, because UE4 4.26)
  2. changed to "tensorflow==2.2.0" in requirements.txt
  3. installed requirements (I have Python 3.8)
  4. ran the installer and started the server
  5. The server started OK

C)

  1. Back to my project, hit a key that ran SendStringInput to "onJsonInput"
  2. this is what I got:

connect async handler error Traceback (most recent call last): File "C:\Users\luist\AppData\Roaming\Python\Python38\site-packages\engineio\asyncio_server.py", line 447, in _trigger_event ret = await self.handlers[event](*args) File "C:\Users\luist\AppData\Roaming\Python\Python38\site-packages\socketio\asyncio_server.py", line 484, in _handle_eio_connect return await self._handle_connect(sid, '/') File "C:\Users\luist\AppData\Roaming\Python\Python38\site-packages\socketio\asyncio_server.py", line 408, in _handle_connect await self._send_packet(sid, packet.Packet(packet.CONNECT, File "C:\Users\luist\AppData\Roaming\Python\Python38\site-packages\socketio\asyncio_server.py", line 378, in _send_packet await self.eio.send(sid, encoded_packet, binary=False) TypeError: send() got an unexpected keyword argument 'binary'

LTorrao avatar Jan 04 '21 19:01 LTorrao

Is ml-remote-server running on windows or linux? I'll need to try to replicate the setup to see what could be causing the binary param mismatch.

At a glance it appears to be a socket.io version mismatch on python side. Make sure you're not using a too new of a version?

getnamo avatar Jan 11 '21 20:01 getnamo

Thank you, @getnamo

I'm running this on a single windows 10 laptop (both UE project and server)

LTorrao avatar Jan 11 '21 22:01 LTorrao

@getnamo this might give more info, if I run pip install python-socketio, I get:

`D:\ml-remote-server-tensorflow>pip install python-socketio Requirement already satisfied: python-socketio in c:\users\luist\appdata\roaming\python\python38\site-packages (4.3.1) Requirement already satisfied: six>=1.9.0 in c:\users\luist\appdata\roaming\python\python38\site-packages (from python-socketio) (1.15.0) Requirement already satisfied: python-engineio>=3.9.0 in c:\users\luist\appdata\roaming\python\python38\site-packages (from python-socketio) (4.0.0) WARNING: You are using pip version 19.2.3, however version 20.3.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

D:\ml-remote-server-tensorflow>`

LTorrao avatar Jan 12 '21 13:01 LTorrao

Ran into the same issue. Tried "upgrade" python-engineio==3.13.2 and solved the issue.

image

xukan840730 avatar Jan 25 '22 01:01 xukan840730