{"record":{"id":"6f8b7cda5cf4d1f9","repo":"Zackriya-Solutions/meetily","slug":"model-is-not-downloaded","errorCode":null,"errorMessage":"Model {} is not downloaded","messagePattern":"Model (.+?) is not downloaded","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/whisper_engine/whisper_engine.rs","lineNumber":331,"sourceCode":"                    WhisperContext::new_with_params(&model_info.path.to_string_lossy(), context_param)\n                        .map_err(|e| anyhow!(\"Failed to load model {}: {}\", model_name, e))?\n                    // Suppressor dropped here, stderr restored\n                };\n\n                // Update current context and model\n                *self.current_context.write().await = Some(ctx);\n                *self.current_model.write().await = Some(model_name.to_string());\n\n                // Enhanced acceleration status reporting\n                let acceleration_status = acceleration.status_label();\n\n                log::info!(\"Successfully loaded model: {} with {} (Performance Tier: {:?}, Beam Size: {}, Threads: {:?})\",\n                          model_name, acceleration_status, hardware_profile.performance_tier,\n                          adaptive_config.beam_size, adaptive_config.max_threads);\n                Ok(())\n            },\n            ModelStatus::Missing => {\n                Err(anyhow!(\"Model {} is not downloaded\", model_name))\n            },\n            ModelStatus::Downloading { .. } => {\n                Err(anyhow!(\"Model {} is currently downloading\", model_name))\n            },\n            ModelStatus::Error(ref err) => {\n                Err(anyhow!(\"Model {} has error: {}\", model_name, err))\n            },\n            ModelStatus::Corrupted { .. } => {\n                Err(anyhow!(\"Model {} is corrupted and cannot be loaded\", model_name))\n            }\n        }\n    }\n\n    pub async fn unload_model(&self) -> bool  {\n        let mut ctx_guard = self.current_context.write().await;\n        let unloaded = ctx_guard.take().is_some();\n        if unloaded {\n            log::info!(\"📉Whisper model unloaded\");","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/whisper_engine/whisper_engine.rs#L313-L349","documentation":"load_model matched the name in available_models but its ModelStatus is Missing: the catalog entry exists, however no model file was found on disk. The engine refuses to load and expects the model to be downloaded first (neighboring statuses produce their own messages for Downloading/Error/Corrupted).","triggerScenarios":"Calling load_model for a model whose file is absent from the models directory: fresh install before any download, the model file was deleted or moved externally, or the download has not finished (that state raises the separate 'currently downloading' error).","commonSituations":"First launch with no models downloaded; user or a cleanup tool emptied the models folder; settings persist a previously downloaded model name whose file was removed.","solutions":["Download the model first via the model manager / UI download flow, then load it","If the file was placed manually, put it at the exact expected path and filename inside the models directory and refresh the model list","Re-select an available model in settings if the previously used one is gone"],"exampleFix":"// before - load blindly, fails with 'Model base is not downloaded'\nengine.load_model(\"base\").await?;\n\n// after - check status and download when missing\nuse whisper_engine::ModelStatus;\nlet models = engine.list_models().await?;\nlet m = models.iter().find(|m| m.name == \"base\").unwrap();\nmatch m.status {\n    ModelStatus::Available => engine.load_model(\"base\").await?,\n    ModelStatus::Missing => { engine.download_model(\"base\").await?; engine.load_model(\"base\").await? }\n    other => return Err(anyhow!(\"Model base not loadable: {:?}\", other)),\n}","handlingStrategy":"validation","validationCode":"use whisper_engine::ModelStatus;\nlet models = engine.list_models().await?;\nmatch models.iter().find(|m| m.name == model_name) {\n    Some(m) if matches!(m.status, ModelStatus::Available) => engine.load_model(model_name).await?,\n    Some(_) => engine.download_model(model_name).await?, // Missing/NotDownloaded -> fetch first\n    None => return Err(anyhow!(\"model {:?} unknown\", model_name)),\n}","typeGuard":"async fn is_model_ready(engine: &WhisperEngine, name: &str) -> bool {\n    engine.available_models.read().await\n        .get(name)\n        .map(|m| matches!(m.status, ModelStatus::Available))\n        .unwrap_or(false)\n}","tryCatchPattern":"try { engine.load_model(name).await? }\ncatch (e) if e.to_string().contains(\"is not downloaded\") {\n    engine.download_model(name).await?;\n    engine.load_model(name).await?;\n}","preventionTips":["Check ModelStatus before load_model; drive the UI download button from the same status","Disable model selection in the UI for entries whose status is not Available","Refresh the model list when the models directory changes (manual file add/remove)"],"tags":["whisper","model-download","status","lifecycle"],"backgroundTag":"model-not-downloaded","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}