{"record":{"id":"8acc5838fd691d2f","repo":"pola-rs/polars","slug":"failed-to-create-spill-file-e","errorCode":null,"errorMessage":"failed to create spill file '{}': {e}","messagePattern":"failed to create spill file '(.+?)': (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-ooc/src/spill_frame.rs","lineNumber":62,"sourceCode":"        let file = ASYNC\n            .spawn(async move {\n                let size = buf.len() as u64;\n                let spill_file = SpillFile::new(&context_id, \"ipc\", size);\n                if BYTES_SPILLED_TO_DISK.fetch_add(size).saturating_add(size)\n                    > polars_config::config().ooc_disk_budget_bytes()\n                {\n                    spill_file.creation_aborted();\n                    polars_error::abort::polars_abort_ooc_out_of_disk();\n                }\n                match tokio::fs::write(spill_file.path(), buf).await {\n                    Ok(()) => spill_file,\n                    Err(e) => {\n                        let msg = format!(\n                            \"failed to create spill file '{}': {e}\",\n                            spill_file.path().display()\n                        );\n                        spill_file.creation_aborted();\n                        panic!(\"{msg}\")\n                    },\n                }\n            })\n            .await\n            .unwrap();\n        Arc::new(file)\n    }\n\n    async fn unspill(location: &Self::Spilled) -> Self {\n        let path = location.path().to_owned();\n        ASYNC\n            .spawn_blocking(move || {\n                let file = std::fs::File::open(&path).unwrap_or_else(|e| {\n                    panic!(\"failed to open spill file {:?}: {e}\", path.display())\n                });\n                IpcStreamReader::new(file).finish().unwrap_or_else(|e| {\n                    panic!(\"failed to read spill file {:?}: {e}\", path.display())\n                })","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/crates/polars-ooc/src/spill_frame.rs#L44-L80","documentation":"Panic in the OOC spill path when tokio::fs::write fails to create the spill file on disk (permissions, ENOSPC, or invalid path). The message names the file and io error; free disk space or fix the spill directory.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"failed to create spill file '{}': {e}\". 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 (\"failed to create spill file '{}': {e}\"). 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":["Verify the spill directory path is valid and writable; creating the spill file failed.","Free disk space or point the spill directory at a volume with capacity."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T05:17:10.506Z"}