openpi
openpi copied to clipboard
Client failed to connect: websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
I'm trying to deploy the OpenPI inference server by following the official instructions. The server seems to start correctly, but when I run the client, it fails with the following error: websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
Steps to reproduce
I ran the server using:
python scripts/serve_policy.py --policy.config=pi0_fast_droid --policy.dir=/path/to/checkpoint (The server prints: server listening on 0.0.0.0:8000)
Then I ran the client:
python examples/simple_client/main.py --env=DROID The client failed with:
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
python examples/simple_client/main.py --env=DROID INFO:root:Waiting for server at ws://10.67.185.12:8000... Traceback (most recent call last): File "/root/miniconda/envs/openpi/lib/python3.11/site-packages/websockets/http11.py", line 241, in parse status_line = yield from parse_line(read_line) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda/envs/openpi/lib/python3.11/site-packages/websockets/http11.py", line 309, in parse_line line = yield from read_line(MAX_LINE_LENGTH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda/envs/openpi/lib/python3.11/site-packages/websockets/streams.py", line 46, in read_line raise EOFError(f"stream ends after {p} bytes, before end of line") EOFError: stream ends after 0 bytes, before end of line
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/root/miniconda/envs/openpi/lib/python3.11/site-packages/websockets/client.py", line 301, in parse response = yield from Response.parse( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda/envs/openpi/lib/python3.11/site-packages/websockets/http11.py", line 243, in parse raise EOFError("connection closed while reading HTTP status line") from exc EOFError: connection closed while reading HTTP status line
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/paddlejob/workspace/openpi/examples/simple_client/main.py", line 189, in