pola-rs/polars · error · PolarsError
{err}: {path}
Error message
{err}: {path} What it means
Error forwarded by _limit_path_len_io_err when wrapping an io::Error from a failed file operation (e.g. open_file). The message embeds the underlying OS error and the file path; when the path exceeds 88 chars and POLARS_VERBOSE is off, the path is truncated to its last 88 characters to keep messages readable.
Solutions
- Fix the underlying I/O error for the given path: check the file exists, permissions are correct, and the disk is not full.
Example fix
import os; assert os.path.exists(path)
Defensive patterns
Strategy: try-catch
When it happens
Trigger: A filesystem operation on {path} failed with the underlying OS error {err}.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@9b5d73fd00 (2026-08-19).
Data as JSON: /api/errors/f8044790adf94803.
Report an issue: GitHub.
Appendix: source
Thrown at crates/polars-utils/src/io.rs:15
use std::fs::File;
use std::io;
use std::path::Path;
use polars_error::*;
pub fn _limit_path_len_io_err(path: &Path, err: io::Error) -> PolarsError {
let path = path.to_string_lossy();
let msg = if path.len() > 88 && !polars_config::config().verbose() {
let truncated_path: String = path.chars().skip(path.len() - 88).collect();
format!("{err}: ...{truncated_path} (set POLARS_VERBOSE=1 to see full path)")
} else {
format!("{err}: {path}")
};
io::Error::new(err.kind(), msg).into()
}
pub fn open_file(path: &Path) -> PolarsResult<File> {
File::open(path).map_err(|err| _limit_path_len_io_err(path, err))
}
pub fn open_file_write(path: &Path) -> PolarsResult<File> {
std::fs::OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(path)
.map_err(|err| _limit_path_len_io_err(path, err))
}
pub fn create_file(path: &Path) -> PolarsResult<File> {
File::create(path).map_err(|err| _limit_path_len_io_err(path, err))
}View on GitHub (pinned to 9b5d73fd00)