High severity HTTP 404 beginner · Fix: 2-5 min

ModelNotFoundError

ollama.exceptions.ModelNotFoundError or HTTP 404 from Ollama registry

What this error means
Ollama cannot find the specified Qwen model in its registry or local cache, failing the pull operation with a 404 not-found error.

Stack trace

traceback
Error: could not find "qwen2.5" (latest tag) in registry
Error pulling qwen2.5: model qwen2.5 not found in registry: {"errors":[{"code":"NAME_UNKNOWN","message":"repository unknown"}]}
Details:
Calling ollama pull qwen2.5
Response status: 404
Registry: https://registry.ollama.ai
QUICK FIX
Replace `ollama pull qwen2.5` with `ollama pull qwen2.5:7b` and verify the tag exists on https://ollama.ai/library/qwen2.5 before pulling.

Why it happens

Ollama's registry uses specific, case-sensitive model identifiers. The tag 'qwen2.5' does not exist in the official Ollama model registry: the correct identifier is 'qwen2.5:latest' or a specific version tag like 'qwen2.5:7b'. Additionally, Ollama may be trying to fetch from a stale or misconfigured registry endpoint, or the model simply isn't published to the public registry yet.

Detection

Run `ollama list` to see locally cached models. Check `ollama pull qwen2.5 2>&1 | grep -i 'not found'` or check the Ollama logs at `~/.ollama/logs` to capture the exact registry error before it fails.

Causes & fixes

1

Using incorrect model tag 'qwen2.5' without the size suffix or version specifier

✓ Fix

Use the full correct tag: `ollama pull qwen2.5:7b` or `ollama pull qwen2.5:14b` or `ollama pull qwen2.5:32b`. Check the official Ollama model library at https://ollama.ai/library/qwen2.5 for exact available tags.

2

Ollama registry endpoint is misconfigured, offline, or rate-limited

✓ Fix

Verify registry connectivity: `curl -I https://registry.ollama.ai`. If offline, restart Ollama with `ollama serve`. If rate-limited, wait 5 minutes and retry. Check firewall/proxy settings blocking registry.ollama.ai.

3

Model exists locally but 'ollama pull' is trying to fetch a non-existent remote version

✓ Fix

Check local cache: `ollama list | grep qwen`. If present, use it directly with `ollama run qwen2.5:7b`. If pulling a newer version, verify the tag exists on Ollama's registry first.

4

Using a deprecated Qwen1 or Qwen1.5 model name instead of Qwen2.5

✓ Fix

Update to Qwen2.5: `ollama pull qwen2.5:7b`. Do NOT use 'qwen:latest' or 'qwen1.5': these are deprecated. Qwen2.5 is the current stable release (2025).

Code: broken vs fixed

Broken - triggers the error
python
#!/usr/bin/env python3
import subprocess
import os

# BROKEN: Trying to pull a non-existent model tag
model_name = "qwen2.5"  # ❌ This tag does not exist in Ollama registry
result = subprocess.run(
    ["ollama", "pull", model_name],
    capture_output=True,
    text=True
)
if result.returncode != 0:
    print(f"Error: {result.stderr}")
    # Error: could not find "qwen2.5" (latest tag) in registry
else:
    print(f"Successfully pulled {model_name}")
Fixed - works correctly
python
#!/usr/bin/env python3
import subprocess
import os
import time

# FIXED: Use the correct model tag with size specifier
model_name = "qwen2.5:7b"  # ✅ Use the full tag with size suffix
max_retries = 3
retry_count = 0

while retry_count < max_retries:
    result = subprocess.run(
        ["ollama", "pull", model_name],
        capture_output=True,
        text=True,
        timeout=600  # 10 min timeout for large model downloads
    )
    
    if result.returncode == 0:
        print(f"✓ Successfully pulled {model_name}")
        break
    elif "not found" in result.stderr.lower():
        print(f"✗ Model tag '{model_name}' not found in registry.")
        print(f"  Available tags: qwen2.5:7b, qwen2.5:14b, qwen2.5:32b")
        print(f"  Verify at: https://ollama.ai/library/qwen2.5")
        break
    elif "connection" in result.stderr.lower() or result.returncode == 1:
        retry_count += 1
        if retry_count < max_retries:
            print(f"⟳ Registry connection issue, retrying ({retry_count}/{max_retries})...")
            time.sleep(5)
        else:
            print(f"✗ Failed to pull after {max_retries} attempts: {result.stderr}")
    else:
        print(f"✗ Error: {result.stderr}")
        break

# Verify the model is available locally
verify = subprocess.run(
    ["ollama", "list"],
    capture_output=True,
    text=True
)
if model_name in verify.stdout:
    print(f"✓ Model {model_name} is ready to use")
Changed the model tag from the non-existent 'qwen2.5' to 'qwen2.5:7b' with a specific size suffix, added retry logic for registry connection errors, and included verification that the model is actually available locally before considering the operation complete.

Workaround

If the Ollama registry is unavailable or slow, manually download the Qwen2.5 GGUF file from HuggingFace (e.g., 'TheBloke/Qwen2.5-7B-Instruct-GGUF'), place it in `~/.ollama/models/blobs/`, and create a custom Modelfile pointing to it: `FROM ~/qwen2.5-7b.gguf`. Then run `ollama create qwen2.5:local -f Modelfile` to use the local model without registry access.

Prevention

Always check the official Ollama model library (https://ollama.ai/library/qwen2.5) before pulling to confirm the exact tag format. Pin model versions in your automation: `ollama pull qwen2.5:7b@sha256:<hash>`. Set up a local Ollama mirror or use Ollama's offline mode for CI/CD pipelines to avoid registry failures. Implement health checks: `ollama list` before attempting pulls.

Python 3.9+ · ollama >=0.1.0 · tested on 0.3.x
Verified 2026-04 · qwen2.5:7b, qwen2.5:14b, qwen2.5:32b
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.