ajeetdsouza/zoxide · error · ImportError
invalid utf-8
Error message
invalid utf-8
What it means
Error "invalid utf-8" thrown in ajeetdsouza/zoxide.
Source
Thrown at src/import/atuin.rs:51
buf: Vec<u8>,
line_num: usize,
child: Child,
prev_cwd: Option<String>,
}
impl Iter {
fn new(reader: BufReader<ChildStdout>, child: Child) -> Self {
Self { reader, buf: Vec::new(), line_num: 0, child, prev_cwd: None }
}
fn err(&self, source: anyhow::Error) -> ImportError {
ImportError { path: None, line_num: self.line_num, source }
}
fn parse_line(&self, line: &[u8]) -> Result<Dir<'static>, ImportError> {
let line =
str::from_utf8(line).map_err(|e| self.err(anyhow!(e).context("invalid utf-8")))?;
let (timestamp, path) =
line.split_once('\t').ok_or_else(|| self.err(anyhow!("invalid entry: {line}")))?;
let timestamp_format =
time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]");
let timestamp = time::PrimitiveDateTime::parse(timestamp, timestamp_format)
.map_err(|e| self.err(anyhow!(e).context(format!("invalid timestamp: {timestamp:?}"))))?
.assume_utc()
.unix_timestamp();
let dir = Dir {
path: Cow::Owned(path.to_string()),
rank: 1.0,
last_accessed: timestamp as Epoch,
};
Ok(dir)
}View on GitHub (pinned to ee594e6906)
When it happens
Trigger: Thrown at src/import/atuin.rs:51 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of ajeetdsouza/zoxide@ee594e6906 (2026-08-16).
Data as JSON: /api/errors/80340d9b8c4b4e21.
Report an issue: GitHub.