OpenBB-finance/OpenBB · error · ValueError
No indicators match the specified filters
Error message
No indicators match the specified filters (depth={depth}, parent_id={parent_id}, indicators={indicators}). Total entries in hierarchy: {len(table_structure['indicators'])} What it means
After filtering the table hierarchy by depth, parent_id, and/or an indicators list, no entries carry an indicator_code (pure grouping nodes are skipped). ValueError reports the filters and total hierarchy size so you can tell whether the hierarchy is empty or your filters are too narrow.
Solutions
- Inspect table_structure['indicators'] and start from the root (no filters), adding one filter at a time.
- Verify parent_id is the hierarchy node's code, not its human-readable label.
- Check the depth value against actual entry depths in the structure.
- Confirm indicator codes belong to this table's codelist.
Example fix
# before
result = tb.get_table('BOP::T', parent_id='Trade Balance', depth=3) # name, not code
# after
entries = table_structure['indicators']
parent = next(e['id'] for e in entries if 'trade' in e.get('label','').lower())
result = tb.get_table('BOP::T', parent_id=parent, depth=3) Defensive patterns
Strategy: validation
Validate before calling
def filters_match_indicators(table_structure, depth=None, parent_id=None, indicators=None):
entries = table_structure['indicators']
if parent_id is not None:
entries = [e for e in entries if e.get('parent_id') == parent_id or e.get('parentId') == parent_id]
if depth is not None:
entries = [e for e in entries if e.get('depth') == depth]
if indicators:
entries = [e for e in entries if e.get('indicator_code') in set(indicators)]
return any(e.get('indicator_code') for e in entries) Type guard
def entry_has_indicator_code(entry: dict) -> bool:
return isinstance(entry, dict) and bool(entry.get('indicator_code')) Try / catch
try:
result = tb.get_table(flow_table, depth=depth, parent_id=parent_id)
except ValueError as e:
if 'No indicators match' in str(e):
result = tb.get_table(flow_table, parent_id=None, depth=None) # start wide, filter locally
else:
raise Prevention
- Inspect table_structure['indicators'] once and cache the tree; navigate by code, not label.
- Apply one filter at a time when drilling hierarchies.
- Remember group nodes without indicator_code are intentionally skipped.
When it happens
Trigger: parent_id pointing at a leaf/group with no coded children, depth filtering to a level that only contains group headers, or indicators codes that match nothing in this table.
Common situations: Drilling a hierarchy with a wrong parent_id (often a display name instead of the code), expecting every depth level to have codes, or indicator codes copied from a different table.
Related errors
- dataflow is required. Either provide it directly or use…
- Dataflow mismatch: provided
- Hierarchy ' ' not found. Available
- No tables/hierarchies found for dataflow
- A query must be provided when no dataflows and keywords are…
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/71f13a96fbf849a0.
Report an issue: GitHub.
Appendix: source
Thrown at openbb_platform/providers/imf/openbb_imf/utils/table_builder.py:239
entry
for entry in filtered_hierarchy_entries
if entry.get("parent_id") == parent_id
]
elif depth is not None:
# Filter by depth
filtered_hierarchy_entries = [
entry
for entry in filtered_hierarchy_entries
if entry.get("depth") == depth
]
# Extract entries with actual indicator codes (skip pure groups with no code)
entries_with_codes = [
entry for entry in filtered_hierarchy_entries if entry.get("indicator_code")
]
if not entries_with_codes:
raise ValueError(
"No indicators match the specified filters "
f"(depth={depth}, parent_id={parent_id}, indicators={indicators}). "
f"Total entries in hierarchy: {len(table_structure['indicators'])}"
)
dimension_codes: dict = defaultdict(list)
dimension_codes_with_depth = defaultdict(list)
codelist_to_dimension_cache = {}
for entry in entries_with_codes:
indicator_code = entry.get("indicator_code")
code_urn = entry.get("code_urn", "")
if not indicator_code:
continue
dimension_id = entry.get("dimension_id")
View on GitHub (pinned to 3e071fcc2c)