OpenBB-finance/OpenBB · error · ValueError
Invalid symbol format '{sym}'. Identifier cannot be empty. E
Error message
Invalid symbol format '{sym}'. Identifier cannot be empty. Expected 'dataflow::identifier'. What it means
Error "Invalid symbol format '{sym}'. Identifier cannot be empty. Expected 'dataflow::identifier'." thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:338
for s in self.symbol.split(",") # type: ignore # pylint: disable=E1101
]
tables: list[str] = []
indicators: list[tuple[str, str]] = []
dataflows_seen: set[str] = set()
for sym in symbols:
if "::" not in sym:
raise ValueError(
f"Invalid symbol format '{sym}'. Expected 'dataflow::identifier'. "
"Use `available_indicators()` or `list_tables()` to find valid symbols."
)
parts = sym.split("::", 1)
dataflow = parts[0].strip().upper()
identifier = parts[1].strip()
if not identifier:
raise ValueError(
f"Invalid symbol format '{sym}'. Identifier cannot be empty. "
"Expected 'dataflow::identifier'."
)
dataflows_seen.add(dataflow)
# Tables can start with H_ or be any valid hierarchy ID for the dataflow
is_table = False
if identifier.startswith("H_"):
is_table = True
else:
metadata = ImfMetadata()
try:
hierarchies = metadata.get_dataflow_hierarchies(dataflow)
hierarchy_ids = {h.get("id") for h in hierarchies}
if identifier in hierarchy_ids:
is_table = True
except Exception: # noqaView on GitHub (pinned to 3e071fcc2c)
Solutions
- Provide a non-empty identifier after the '::' separator.
- Format the symbol as 'dataflow::identifier'.
When it happens
Trigger: Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:338 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/e9f7f2cba0002f69.
Report an issue: GitHub.