Replies: 1 comment
-
|
Hi @HSGartley, Thanks for the clear bug report and the reproducer - the root cause trace you included was correct. The fix moves the This is now on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, a bug report here. The NT version is 1.221, please confirm, if it was solved in the latest versions. Thanks in advance.
The test attached.
================================================================================
BUG REPORT – NautilusTrader v1.221.0
TITLE:
subscribe_bars()on a SyntheticInstrument raises"Error subscribing to CC / IB bars: 'client' argument was
None"when multiple real venue clients are registered alongside a SYNTH instrument.
AFFECTED VERSION: 1.221.0
EXPECTED FIXED IN: 1.222.0+ (see PR #3257 / related routing fix)
SYMPTOMS:
When a BacktestEngine (or LiveNode) has ≥2 real venue DataClients registered
(e.g. SIM + IB, or CC + IB), any call to
subscribe_bars()for a BarTypewhose instrument_id lives on venue SYNTH fails with:
The same subscribe_bars() call on a single-venue setup does NOT trigger
the error, which is why it is hard to reproduce in minimal scripts.
ROOT CAUSE (traced in data/engine.pyx / engine.pxi):
DataEngine._execute_subscribe_bars() attempts to resolve the DataClient
responsible for the subscription via:
where
client_idis derived from the venue of the BarType's instrument_id.For a SyntheticInstrument the venue is always
SYNTH. There is no realDataClient registered for
SYNTH, so the lookup returns None.In a single-venue setup the engine falls through to an early-exit "internal
aggregation" path BEFORE the client lookup. With ≥2 registered clients the
routing table branch is reached first, the SYNTH venue produces client=None,
and the assertion / guard raises.
REPRODUCTION:
Run this file with pytest or plain python:
python test_synth_bar_subscription_bug.py
A PASS means the bug is present (the engine emits the ERROR log but continues).
To assert the bug is fixed, the ERROR log must be absent.
REPORTER: HSGartley
DATE: 2026-06-16
LINKED ISSUES: #3257
test_synth_bar_subscription_bug.py
Beta Was this translation helpful? Give feedback.
All reactions