{"record":{"id":"38a3103fc0ba9efc","repo":"pola-rs/polars","slug":"invalid-scan-args-from-python-dataset-resolve","errorCode":null,"errorMessage":"invalid scan args from python dataset resolve: {:?}","messagePattern":"invalid scan args from python dataset resolve: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-plan/src/plans/optimizer/expand_datasets.rs","lineNumber":339,"sourceCode":"                rechunk,\n                cache,\n                glob: _,\n                hidden_file_prefix: _hidden_file_prefix @ None,\n                projection: _projection @ None,\n                column_mapping,\n                default_values,\n                row_index: _row_index @ None,\n                pre_slice: _pre_slice @ None,\n                cast_columns_policy,\n                missing_columns_policy,\n                extra_columns_policy,\n                include_file_paths: _include_file_paths @ None,\n                deletion_files,\n                table_statistics,\n                row_count,\n            } = resolved_unified_scan_args.as_ref()\n            else {\n                panic!(\n                    \"invalid scan args from python dataset resolve: {:?}\",\n                    resolved_unified_scan_args\n                )\n            };\n\n            unified_scan_args.cloud_options = cloud_options.clone();\n            unified_scan_args.rechunk = *rechunk;\n            unified_scan_args.cache = *cache;\n            unified_scan_args.cast_columns_policy = cast_columns_policy.clone();\n            unified_scan_args.missing_columns_policy = *missing_columns_policy;\n            unified_scan_args.extra_columns_policy = *extra_columns_policy;\n            unified_scan_args.column_mapping = column_mapping.clone();\n            unified_scan_args.default_values = default_values.clone();\n            unified_scan_args.deletion_files = deletion_files.clone();\n            unified_scan_args.table_statistics = table_statistics.clone();\n            unified_scan_args.row_count = *row_count;\n\n            if row_index_in_live_filter {","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/pola-rs/polars/blob/fc24390824009e8fc5b7870e256273c1b140a019/crates/polars-plan/src/plans/optimizer/expand_datasets.rs#L321-L357","documentation":"The python dataset-scan resolve path destructures FileScanArgs expecting an untouched pattern (projection=None, row_index=None, pre_slice=None, include_file_paths=None, hidden_file_prefix=None); if Python supplied any of these unsupported scan arguments the pattern match fails and panics naming the args. Strip unsupported options from the python-side dataset scan.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"invalid scan args from python dataset resolve: {:?}\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"invalid scan args from python dataset resolve: {:?}\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["The Python dataset resolve returned invalid scan arguments; check the dataset object's schema and options.","Update polars/python-side dataset integration so the serialized scan args match the expected format."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fc24390824009e8fc5b7870e256273c1b140a019","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}