{"record":{"id":"86c7953fde66808b","repo":"pola-rs/polars","slug":"cannot-use-glob-patterns-and-integer-based-project-86c795","errorCode":null,"errorMessage":"cannot use glob patterns and integer based projection as `columns` argument\n\nUse columns: List[str]","messagePattern":"cannot use glob patterns and integer based projection as `columns` argument\n\nUse columns: List\\[str\\]","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/ipc/functions.py","lineNumber":263,"sourceCode":"    ----------\n    source\n        Path to a file or a file-like object (by \"file-like object\" we refer to objects\n        that have a `read()` method, such as a file handler like the builtin `open`\n        function, or a `BytesIO` instance). If `fsspec` is installed, it might be used\n        to open remote files. For file-like objects, the stream position may not be\n        updated accordingly after reading.\n    columns\n        Columns to select. Accepts a list of column indices (starting at zero) or a list\n        of column names.\n    n_rows\n        Stop reading from IPC stream after reading `n_rows`.\n        Only valid when `use_pyarrow=False`.\n    use_pyarrow\n        Use pyarrow or the native Rust reader.\n    storage_options\n        Extra options that make sense for `fsspec.open()` or a particular storage\n        connection, e.g. host, port, username, password, etc.\n    row_index_name\n        Insert a row index column with the given name into the DataFrame as the first\n        column. If set to `None` (default), no row index column is created.\n    row_index_offset\n        Start the row index at this offset. Cannot be negative.\n        Only used if `row_index_name` is set.\n\n    Returns\n    -------\n    DataFrame\n    \"\"\"\n    with prepare_file_arg(\n        source, use_pyarrow=use_pyarrow, storage_options=storage_options\n    ) as data:\n        if use_pyarrow:\n            pyarrow_ipc = import_optional(\n                \"pyarrow.ipc\",\n                err_prefix=\"\",\n                err_suffix=\"is required when using 'read_ipc_stream(..., use_pyarrow=True)'\",","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/py-polars/src/polars/io/ipc/functions.py#L245-L281","documentation":"Guard in read_ipc when the source is a local glob pattern and `columns` was given as integer indices. Across multiple matched files, positional indices are ambiguous, so only List[str] column selection is supported on the glob path. Pass columns as names.","triggerScenarios":"Thrown at py-polars/src/polars/io/ipc/functions.py:263 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["When using glob patterns, pass columns as a list of column names (List[str]); integer projection cannot be combined with globs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68506541d2de983056c9eb244e1ea05fab377dfc","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}