{"record":{"id":"f6386de5e9e8f159","repo":"pola-rs/polars","slug":"unknown-type-for-catalog-parameter-type-catalo","errorCode":null,"errorMessage":"unknown type for `catalog` parameter: {type(catalog)}","messagePattern":"unknown type for `catalog` parameter: (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/iceberg/_dataset.py","lineNumber":165,"sourceCode":"    @staticmethod\n    def _from_api_parameter_or_environment_default(\n        catalog: pyiceberg.catalog.Catalog | IcebergCatalogConfig | None,\n        *,\n        fn_name: Literal[\"scan_iceberg\", \"sink_iceberg\"],\n    ) -> IcebergCatalogConfig:\n        import pyiceberg.catalog\n        from pyiceberg.catalog.noop import NoopCatalog\n\n        import polars._utils.logging\n        from polars._utils.logging import eprint\n\n        if isinstance(catalog, IcebergCatalogConfig):\n            catalog_config = catalog\n        elif isinstance(catalog, pyiceberg.catalog.Catalog):\n            catalog_config = IcebergCatalogConfig.from_catalog(catalog)\n        elif catalog is not None:\n            msg = f\"unknown type for `catalog` parameter: {type(catalog)}\"\n            raise TypeError(msg)\n        else:\n            if polars._utils.logging.verbose():\n                eprint(f\"{fn_name}(): calling pyiceberg.catalog.load_catalog()\")\n\n            try:\n                default_catalog = pyiceberg.catalog.load_catalog()\n\n            except Exception as error:\n                static_metadata_hint = (\n                    (\n                        \" \"\n                        \"If you intended to pass a static metadata path, \"\n                        \"ensure it is an absolute path.\"\n                    )\n                    if fn_name == \"scan_iceberg\"\n                    else \"\"\n                )\n","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/io/iceberg/_dataset.py#L147-L183","documentation":"Error \"unknown type for `catalog` parameter: {type(catalog)}\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at py-polars/src/polars/io/iceberg/_dataset.py:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}