Skip to content

2026.05.20 fix compressed_vipc.py by using pyzmq for zmq client#38072

Open
zhangxu1994ye wants to merge 5 commits into
commaai:masterfrom
zhangxu1994ye:fix-tools-compressed-vipc
Open

2026.05.20 fix compressed_vipc.py by using pyzmq for zmq client#38072
zhangxu1994ye wants to merge 5 commits into
commaai:masterfrom
zhangxu1994ye:fix-tools-compressed-vipc

Conversation

@zhangxu1994ye
Copy link
Copy Markdown

Summary

Fix the runtime error in tools/compressed_vipc.py caused by the missing zmq implementation.
Problem Description

Running tools/compressed_vipc.py results in an error (see attached screenshot below).
Snipaste_2026-05-20_21-28-14

After investigation, I found that the script imports cereal.messaging, which internally uses from msgq.ipc_pyx import SubSocket — a C++ implementation. However, the underlying zmq_impl has been removed. Checking the git history, it appears that the zmq integration was stripped out of msgq in pursuit of zero dependencies, which caused SubSocket to stop working.
Changes Made

Modified the communication layer in tools/compressed_vipc.py:

Replaced the dependency on SubSocket (C++ implementation from cereal.messaging)

Used pyzmq directly to create a client that communicates with the running bridge

The decoding logic remains completely untouched — no changes were made to it.

Verification Result

The modified script runs successfully, and all three camera feeds are now visible in watch3.py.

@github-actions github-actions Bot added the tools label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Process replay diff report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ 0 changed, 66 passed, 0 errors

zhangxu added 4 commits May 21, 2026 14:25
…ing return type annotation, and using idiomatic Python syntax

- Remove unused 'capnp' import
- Update ZmqSubSocket.recv() return type to bytes | None (can return None on timeout)
- Wrap multi-line print statement with parentheses for cleaner formatting
- Use set comprehension syntax instead of set() with generator
…resolve ISC002 implicit string concatenation and UP034 extraneous parentheses lint errors.
…n, and extraneous parentheses in compressed_vipc by using explicit string concatenation and splitting debug print message into multiple lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant