Skip to content

Troubleshoot Python examples

MS2 runtime observations

These observations apply to the named MS2 profiles; they do not establish behavior for every release.

Symptom Reproduced cause and action
Strict audio input raises BufferError A Python list requires materialization. Supply a compatible buffer and inspect the rejected-copy reason.
An audio output cannot be mutated The native export is a read-only memoryview. Keep its owner or make an explicit writable NumPy copy.
Input tap loses request_id metadata The tested in-process path produced empty tap metadata. Use attributed events for participant identity and verify your metadata boundary.
publish_out() does not run the next node It delivers to control-bus subscribers. Publish to an input to enqueue graph work.
RPC stream has no aclose() Close aiter(ctrl.node.method(...)), not the deferred call object.
RPC named status() raises NodeStatus is not callable The name shadows a worker instance attribute. Choose a distinct name such as generation_state.
gRPC endpoint still appears immediately after close Remote unhosting is asynchronous. Poll with a deadline; the example allows three seconds.
Duplicate endpoint registration differs over gRPC The tested gRPC same-attach registration replaced the old host; in-process registration rejected it. Do not assume duplicate rejection parity.
Source plugin fails on join The runner needs both loadable and python-source-plugin. Missing either produced a join error in the test builds.
WebRTC ICE stays new with aiortc 1.14.0 and MAX_BUNDLE Creating the data channel before audio caused this test's stall. Follow the tested audio-first setup.
WebRTC connects but receives no echoed audio The runner dropped an unmatched participant stream ID. Map it to the room's default audio track with FastResampleNode.output_stream_id.
Python copy accounting did not close cleanly on worker shutdown Some tested native shutdowns report incomplete accounting closure despite successful outputs and no surviving children. Retain the diagnostic; process exit does not establish accounting conservation. No runtime fix is claimed here.

The data, session control, RPC/tools, cancellation, and media examples retain these boundaries explicitly.

Run python examples/python/doctor.py --require-ffi with the same interpreter as the failing local example. For remote control, omit --require-ffi. Keep the imported paths and versions with the failure report.

Native module is missing

No module named 'remotemedia.runtime' means the client environment cannot import FFI. Install a compatible native wheel into that exact environment. The diagnostic explains this and exits unsuccessfully when FFI is required. A remote-only control environment is expected to work without FFI.

If Windows reports a DLL load error, record the wheel filename, architecture, native path, and dependency error. A package version match alone does not verify binary dependencies. Follow the tested install profile.

Package installation attempts a native build

For the tested Windows/Python combination, PyPI has no usable binary wheel for FFI 0.4.4. A normal install falls back to its source distribution. Use a supplied compatible wheel for this guide; a Rust source build needs its own toolchain and validation. Do not substitute an arbitrary cached binary without recording its identity.

Attach rejects the token keyword

TypeError mentioning an unexpected token argument indicates an older client API. The published remotemedia-client==0.2.0 lacks it, while the reviewed checkout (also version 0.2.0) includes it. Use the separate checkout control environment.

For 401/403 from Entry, check token role, expiry, developer public key, and listener. Backend control requires a backend token and the admin address. Client admission requires the client token and public /join endpoint.

Deployment returns 422

Read the response's problems list. The local harness initially reproduced a mismatch between the URL pipeline name and manifest.metadata.name; making them equal allowed deployment. The harness retains server error details without printing authorization headers.

Echo arrived but the stream never ends

Input completion and output EOF are distinct. The tested native wheel delivered both echoes but did not close every channel after signal_input_complete(). Stop on the graph's expected result count or explicit application completion signal, cancel/finish receive tasks, and await session.close() in finally. Do not use an unbounded drain loop for this artifact. See streaming lifecycle.

A tap receives no output

Subscribe before publishing, use the correct .out address and node ID, and verify input reaches the live session. An expired wait on an otherwise idle tap does not establish a broken session. Taps observe new output and do not replay history.

Worker IPC does not initialize

Without access to the host's IPC paths, the Windows worker attempt failed with:

Failed to create global iceoryx2 node: InternalError
create_session failed: ... IPC error: Node not initialized

This failure happens before the custom node initializes. Check the host's iceoryx2 IPC filesystem permissions and compatibility between the native build and Python iceoryx2 package. This host uses C:\Temp\, C:\Temp\iceoryx2\, and C:\Temp\iceoryx2\shm\; workspace-only write access was insufficient. Authorized access resolved initialization. Do not delete shared IPC files belonging to other sessions.

The example selects an explicit virtual environment and importable on-disk module. Rerun .venv-worker/Scripts/python.exe scripts/verify_examples.py --worker and require transformed output, the RPC-reported worker PID, configuration preservation, and normal process-tree exit. All these checks passed with the worker profile.

Dotted node type is not registered

Node type 'node_transform.DocsUppercase' not registered was reproduced with the published client after IPC access was enabled. The current registry supports importing dotted class paths. Use the checkout client and matching Python native wheel, keep the module directory importable in the worker, and select that environment with python_env.explicit_venv.

Worker transforms text but RPC times out

The worker can return a reply tagged with the rpc text-channel header. A reply reader that parses the whole tagged string as JSON silently ignores it. The checked-in client fix strips that header before decoding; regression tests cover tagged and untagged replies. Install the checkout including this fix, then rerun the complete worker verifier. A longer timeout cannot repair this decoding error.