{"record":{"id":"3b273f0312e8923a","repo":"pola-rs/polars","slug":"failed-to-load-iceberg-deletion-vector-python-feature-not","errorCode":null,"errorMessage":"failed to load iceberg deletion vector: 'python' feature not enabled","messagePattern":"failed to load iceberg deletion vector: 'python' feature not enabled","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-stream/src/nodes/io_sources/multi_scan/components/row_deletions.rs","lineNumber":725,"sourceCode":"                Ok((data_path, mask))\n            })\n            .collect();\n\n        static LOAD_FROM_BYTES_FN: LazyLock<Py<PyAny>> = LazyLock::new(|| {\n            Python::attach(|py| {\n                use pyo3::types::PyAnyMethods;\n\n                py.import(\"polars.io.iceberg._utils\")\n                    .unwrap()\n                    .getattr(\"load_puffin_deletion_file\")\n                    .unwrap()\n                    .unbind()\n            })\n        });\n    }\n    #[cfg(not(feature = \"python\"))]\n    {\n        panic!(\"failed to load iceberg deletion vector: 'python' feature not enabled\")\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use polars_utils::slice_enum::Slice;\n\n    use super::ExternalFilterMask;\n\n    fn split_mask<I>(mask: I, slice: Slice) -> (Vec<bool>, Slice)\n    where\n        I: IntoIterator<Item = bool>,\n    {\n        let mask = ExternalFilterMask::Iceberg {\n            mask: mask.into_iter().collect(),\n        };\n\n        let slice = mask.calc_physical_slice(slice);","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/crates/polars-stream/src/nodes/io_sources/multi_scan/components/row_deletions.rs#L707-L743","documentation":"Loading an Iceberg deletion vector (Puffin deletes) requires the 'python' feature for the deletion-vector loading path, and the non-python build panics explicitly. When the binary was compiled without feature = \"python\", load_iceberg_puffin_deletes cannot execute and aborts via panic!.","triggerScenarios":"Scanning an Iceberg table whose data files have puffin deletion vectors through a Polars build compiled without the 'python' feature (e.g. polars-cli or a cargo build without --features python).","commonSituations":"Users run the polars-cli or a custom Rust build against an Iceberg table with positional/mor deletes and hit the panic, while the Python bindings build (with python feature) works.","solutions":["Rebuild Polars with the python feature enabled: cargo build --features python (or use the Python bindings, which enable it).","Remove/rewrite the Iceberg deletes so the table has no puffin deletion vectors (e.g. rewrite/compact data files) if a python-less build must be used.","Verify which feature set your binary was built with before scanning Iceberg tables with delete files."],"exampleFix":"// before\ncargo build --release\n// after\ncargo build --release --features python","handlingStrategy":"validation","validationCode":"# Check your build has the required feature before scanning Iceberg tables with deletes\ncargo metadata --format-version 1 | grep -q '\"python\"' && echo 'python feature present' || echo 'python feature MISSING - deletion vectors will panic'","typeGuard":null,"tryCatchPattern":"try:\n    df = pl.scan_iceberg(table).collect()\nexcept Exception as e:\n    if \"'python' feature not enabled\" in str(e):\n        raise RuntimeError('Rebuild Polars with --features python to load Iceberg deletion vectors') from e\n    raise","preventionTips":["Build with the python feature (or use official Python wheels) when reading Iceberg tables.","Check whether the Iceberg table contains puffin deletion vectors before choosing a runtime.","Pin a build recipe (features list) in CI so production binaries match dev behavior."],"tags":["rust","iceberg","feature-flags","deletion-vector"],"backgroundTag":"feature-not-enabled","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}