OpenBB-finance/OpenBB · error · ValueError
Invalid logging handler
Error message
Invalid logging handler
What it means
Raised in the economic-indicators validator when the transform/unit value (resolved from a user-friendly lowercase name to its code via transform_lookup/unit_lookup) is not among the dataflow's available transform-dimension values for the current country+indicator selection. This is the transform analogue of the country/frequency cross-checks.
Source
Thrown at openbb_platform/core/openbb_core/app/model/system_settings.py:103
if not user_settings.exists():
cls.create_json(
user_settings,
{"credentials": {}, "preferences": {}, "defaults": {"commands": {}}},
)
if not system_settings.exists():
cls.create_json(system_settings, {})
return values
@field_validator("logging_handlers")
@classmethod
def validate_logging_handlers(cls, v):
"""Validate the logging handlers."""
for value in v:
if value not in ["stdout", "stderr", "noop", "file"]:
raise ValueError("Invalid logging handler")
return v
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Read the `available values` list in the error message and pass one of those exact codes/names.
- Use `transform='all'` to fetch all transforms and filter client-side.
- Omit `transform` entirely if you don't need unit selection.
- For batches, resolve transforms per dataflow rather than reusing one value everywhere.
Example fix
# before res = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC', country='USA', transform='growth') # after res = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC', country='USA', transform='all')
Defensive patterns
Strategy: try-catch
Try / catch
try:
res = obb.economy.economic_indicators(provider='imf', symbol=sym, country=c, transform=t)
except Exception as e:
if "dimension 'transform'" in str(e):
# transform not offered for this selection: fetch all transforms and filter
res = obb.economy.economic_indicators(provider='imf', symbol=sym, country=c, transform='all')
else:
raise Prevention
- Transform/unit vocabularies differ per dataflow — never reuse one hardcoded list everywhere.
- Prefer transform='all' plus client-side filtering when coverage is unknown.
- Capture the available-values list from the error message to build per-dataflow transform catalogs.
When it happens
Trigger: Passing `transform='growth'` for a dataflow whose UNIT_MEASURE/TRANSFORMATION dimension has no growth entry for that indicator; passing a raw code that isn't in the available values; using a unit name valid in one dataflow (e.g. 'percent_change') in another that uses different codes.
Common situations: Assuming all IFS-style transforms exist across dataflows; hardcoded transform lists copied from one endpoint; IMF codelist differences between dataflows (version drift).
Related errors
- Please install polars: `pip install polars pyarrow` to use
- Chart not found.
- Extension '{ext_name}' is not installed.
- At least one extension type must be selected.
- Incorrect email or password
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/e2409fe30d5f16e9.
Report an issue: GitHub.