unrealcv / unrealcv

UnrealCV: Connecting Computer Vision to Unreal Engine
https://unrealcv.org
MIT License
1.86k stars 432 forks source link

Cannot connect to packaged binary if using UE4Binary start command: Branch 4.25 #206

Closed jojoreeves closed 3 years ago

jojoreeves commented 3 years ago

client.connect() returns:

ERROR:init:63:Error: receive a malformat message, the message should start from a four bytes uint32 magic number ERROR:init:205:Can not connect to ('localhost', 9000) ERROR:init:206:Error 'NoneType' object has no attribute 'startswith'

I have double checked and the port is in use by the binary. Running Get-Process -Id (Get-NetTCPConnection -LocalPort 9000).OwningProcess in PowerShell says that it is in use by my packaged binary.

If I launch the binary manually and bypass the UE4Binary start commands it connects ok though. Should I not be starting it this way? I pulled this from one of the examples.

jojoreeves commented 3 years ago

It may not be UnrealCV actually. I tried with os as well and I get the same issue: import os os.startfile(binary_path)

I was able to work around this with: import subprocess subprocess.Popen([binary_path])

The client connects ok now. Not sure why that is though...