pola-rs/polars · error · ValueError

`use_pyarrow=True` is not supported for Hugging Face

Error message

`use_pyarrow=True` is not supported for Hugging Face

What it means

Error "`use_pyarrow=True` is not supported for Hugging Face" thrown in pola-rs/polars.

Source

Thrown at py-polars/src/polars/io/ipc/functions.py:139

        - You cannot write to the same filename.
          E.g. `pl.read_ipc("my_file.arrow").write_ipc("my_file.arrow")`
          will fail.
    """
    if (
        # Check that it is not a BytesIO object
        isinstance(v := source, (str, Path))
    ) and (
        # HuggingFace only for now ⊂( ◜◒◝ )⊃
        (is_hf := str(v).startswith("hf://"))
        # Also dispatch on FORCE_ASYNC, so that this codepath gets run
        # through by our test suite during CI.
        or os.getenv("POLARS_FORCE_ASYNC") == "1"
        # TODO: Dispatch all paths to `scan_ipc` - this will need a breaking
        # change to the `storage_options` parameter.
    ):
        if is_hf and use_pyarrow:
            msg = "`use_pyarrow=True` is not supported for Hugging Face"
            raise ValueError(msg)

        lf = scan_ipc(
            source,
            n_rows=n_rows,
            storage_options=storage_options,
            row_index_name=row_index_name,
            row_index_offset=row_index_offset,
            rechunk=rechunk,
        )

        if columns:
            if isinstance(columns[0], int):
                lf = lf.select(F.nth(columns))  # type: ignore[arg-type]
            else:
                lf = lf.select(columns)

        df = lf._collect_eager()

View on GitHub (pinned to df599052da)

When it happens

Trigger: Thrown at py-polars/src/polars/io/ipc/functions.py:139 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/67d02cad25c38074. Report an issue: GitHub.