pola-rs/polars · error · TypeError
unknown type for `catalog` parameter: {type(catalog)}
Error message
unknown type for `catalog` parameter: {type(catalog)} What it means
Error "unknown type for `catalog` parameter: {type(catalog)}" thrown in pola-rs/polars.
Source
Thrown at py-polars/src/polars/io/iceberg/_dataset.py:165
@staticmethod
def _from_api_parameter_or_environment_default(
catalog: pyiceberg.catalog.Catalog | IcebergCatalogConfig | None,
*,
fn_name: Literal["scan_iceberg", "sink_iceberg"],
) -> IcebergCatalogConfig:
import pyiceberg.catalog
from pyiceberg.catalog.noop import NoopCatalog
import polars._utils.logging
from polars._utils.logging import eprint
if isinstance(catalog, IcebergCatalogConfig):
catalog_config = catalog
elif isinstance(catalog, pyiceberg.catalog.Catalog):
catalog_config = IcebergCatalogConfig.from_catalog(catalog)
elif catalog is not None:
msg = f"unknown type for `catalog` parameter: {type(catalog)}"
raise TypeError(msg)
else:
if polars._utils.logging.verbose():
eprint(f"{fn_name}(): calling pyiceberg.catalog.load_catalog()")
try:
default_catalog = pyiceberg.catalog.load_catalog()
except Exception as error:
static_metadata_hint = (
(
" "
"If you intended to pass a static metadata path, "
"ensure it is an absolute path."
)
if fn_name == "scan_iceberg"
else ""
)
View on GitHub (pinned to df599052da)
When it happens
Trigger: Thrown at py-polars/src/polars/io/iceberg/_dataset.py:165 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@df599052da (2026-08-16).
Data as JSON: /api/errors/f6386de5e9e8f159.
Report an issue: GitHub.