Cannot connect to packaged binary if using UE4Binary start command: Branch 4.25
jojoreeves opened this issue · 1 comments
- Operating System: Windows Server 2019
- UE4 Version: 4.25.3
- UnrealCV Version: Branch 4.25 dedd72b
- Client (python2, 3 or matlab): Atom/Hydrogen + Python 3.7.8
- Problem Description: Unable to connect to binary after launching it with:
if os.path.isfile(binary_path):
binary = UE4Binary(binary_path)
binary.start()
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.
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...