Zackriya-Solutions/meetily · error
Failed to read {} metadata: {}
Error message
Failed to read {} metadata: {} What it means
Thrown by validate_model_directory when std::fs::metadata fails on an expected Parakeet model artifact inside the model directory. Typically the file is missing (the usual NotFound case), but it also covers permission and IO errors; the artifact filename and underlying io::Error are embedded in the message.
Source
Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:417
available_models.clear();
for model in &models {
available_models.insert(model.name.clone(), model.clone());
}
drop(available_models);
drop(active_downloads);
for (model_name, error) in validation_errors {
log::warn!("Model directory {} appears corrupted: {}", model_name, error);
}
return Ok(models);
}
}
fn validate_model_directory(model_dir: &Path, artifacts: &[ArtifactSpec]) -> Result<()> {
for artifact in artifacts {
let path = model_dir.join(artifact.filename);
let metadata = std::fs::metadata(&path)
.map_err(|error| anyhow!("Failed to read {} metadata: {}", artifact.filename, error))?;
if metadata.len() != artifact.exact_bytes {
return Err(anyhow!(
"{} has {} bytes, expected exactly {} bytes",
artifact.filename,
metadata.len(),
artifact.exact_bytes
));
}
}
Ok(())
}
/// Load a Parakeet model
pub async fn load_model(&self, model_name: &str) -> Result<()> {
let model_info = {
let models = self.available_models.read().await;
modelsView on GitHub (pinned to a2cb62e827)
Solutions
- Check that the file named in the error exists at model_dir/<filename> and is readable
- Re-download the model via the app so all spec artifacts are restored
- Verify the configured model directory path matches the install location for your platform
- Check file/folder permissions and antivirus quarantine logs
- Run the download/verify step with RUST_LOG=debug to see which artifact failed first
Example fix
// before: pointing loader at a non-existent directory
let model_path = PathBuf::from("models/parakeet");
// after: resolve via Tauri path API and ensure directory exists
let model_path = app.path().app_data_dir()?.join("models").join(model_name);
std::fs::create_dir_all(&model_path)?; Defensive patterns
Strategy: validation
Validate before calling
fn all_artifacts_present(model_dir: &Path, artifacts: &[(&str, u64)]) -> bool { artifacts.iter().all(|(f, _)| model_dir.join(f).metadata().map(|m| m.is_file()).unwrap_or(false)) } Type guard
fn artifact_readable(model_dir: &Path, filename: &str) -> bool { std::fs::metadata(model_dir.join(filename)).map(|m| m.is_file()).unwrap_or(false) } Try / catch
match load_parakeet_model(name) { Err(e) if e.to_string().contains("Failed to read") && e.to_string().contains("metadata") => { re_download_model(name).await?; load_parakeet_model(name).await }, other => other } Prevention
- Never manually delete or edit files inside the models directory
- Re-download models through the app after failed/interrupted downloads
- Verify the model directory path matches the platform default (app data dir/models)
- Exclude the models directory from antivirus real-time scanning
When it happens
Trigger: Parakeet model load or post-download verification calls validate_model_directory, and an artifact listed in ArtifactSpec (e.g. encoder/decoder .onnx or vocab file) is absent from model_dir or unreadable — e.g. an interrupted download deleted/corrupted the directory, or the model_dir path points to the wrong folder.
Common situations: User manually deleted or moved files from the models directory (~/Library/Application Support/Meetily/models or %APPDATA%\Meetily\models); download partially completed without validation; antivirus quarantined the file; wrong model_dir passed to the loader; permissions changed after an app update.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Failed to write {}: {}
- Failed to flush {}: {}
- Failed to delete incomplete file {}: {}
- Failed to open file for resume {}: {}
- Failed to create file {}: {}
AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12).
Data as JSON: /api/errors/94815f7fdb3355eb.
Report an issue: GitHub.