{"record":{"id":"67d02cad25c38074","repo":"pola-rs/polars","slug":"use-pyarrow-true-is-not-supported-for-hugging-fa","errorCode":null,"errorMessage":"`use_pyarrow=True` is not supported for Hugging Face","messagePattern":"`use_pyarrow=True` is not supported for Hugging Face","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/ipc/functions.py","lineNumber":139,"sourceCode":"        - You cannot write to the same filename.\n          E.g. `pl.read_ipc(\"my_file.arrow\").write_ipc(\"my_file.arrow\")`\n          will fail.\n    \"\"\"\n    if (\n        # Check that it is not a BytesIO object\n        isinstance(v := source, (str, Path))\n    ) and (\n        # HuggingFace only for now ⊂( ◜◒◝ )⊃\n        (is_hf := str(v).startswith(\"hf://\"))\n        # Also dispatch on FORCE_ASYNC, so that this codepath gets run\n        # through by our test suite during CI.\n        or os.getenv(\"POLARS_FORCE_ASYNC\") == \"1\"\n        # TODO: Dispatch all paths to `scan_ipc` - this will need a breaking\n        # change to the `storage_options` parameter.\n    ):\n        if is_hf and use_pyarrow:\n            msg = \"`use_pyarrow=True` is not supported for Hugging Face\"\n            raise ValueError(msg)\n\n        lf = scan_ipc(\n            source,\n            n_rows=n_rows,\n            storage_options=storage_options,\n            row_index_name=row_index_name,\n            row_index_offset=row_index_offset,\n            rechunk=rechunk,\n        )\n\n        if columns:\n            if isinstance(columns[0], int):\n                lf = lf.select(F.nth(columns))  # type: ignore[arg-type]\n            else:\n                lf = lf.select(columns)\n\n        df = lf._collect_eager()\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/io/ipc/functions.py#L121-L157","documentation":"Error \"`use_pyarrow=True` is not supported for Hugging Face\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at py-polars/src/polars/io/ipc/functions.py:139 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"}