pola-rs/polars · error
failed to read spill file {:?}: {e}
Error message
failed to read spill file {:?}: {e} What it means
Panic in the OOC unspill path when reading/opening the spilled IPC data fails (truncated or corrupted spill file, I/O error mid-read). The message includes the path and error; the spilled intermediate is unusable and the query must be restarted.
Source
Thrown at crates/polars-ooc/src/spill_frame.rs:79
spill_file.creation_aborted();
panic!("{msg}")
},
}
})
.await
.unwrap();
Arc::new(file)
}
async fn unspill(location: &Self::Spilled) -> Self {
let path = location.path().to_owned();
ASYNC
.spawn_blocking(move || {
let file = std::fs::File::open(&path).unwrap_or_else(|e| {
panic!("failed to open spill file {:?}: {e}", path.display())
});
IpcStreamReader::new(file).finish().unwrap_or_else(|e| {
panic!("failed to read spill file {:?}: {e}", path.display())
})
})
.await
.unwrap()
}
}
#[derive(Clone)]
pub struct SpillFrame {
token: SpillToken<DataFrame>,
height: usize,
}
impl AsRef<SpillToken<DataFrame>> for SpillFrame {
fn as_ref(&self) -> &SpillToken<DataFrame> {
&self.token
}
}View on GitHub (pinned to 68506541d2)
Solutions
- The spill file could not be read; check for disk corruption, truncation, or external deletion.
- Retry the query; if the error persists, increase memory or reduce spill volume.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "failed to read 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.
Common situations: Encountered when input data or configuration does not meet the preconditions of the throwing code path ("failed to read 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.
AI-assisted analysis of pola-rs/polars@68506541d2 (2026-08-19).
Data as JSON: /api/errors/389a09f1916bc606.
Report an issue: GitHub.