Navigation: ← Docs Index | Quick Start | Testing
Common solutions for the Active Inference course pipeline.
Run these sanity checks first:
cd software
uv run pytest tests/test_imports.py # Check environment
uv run pytest tests/test_dependencies.py # Check libs
uv run pytest tests/test_real_implementations.py # Verify no mocks| Symptom | Likely Cause | See Section |
|---|---|---|
OSError: cannot load library 'pango' |
Missing system libs | PDF Generation |
gTTSError: 429 |
Rate limiting | Audio Generation |
uv: command not found |
uv not installed | Python / uv |
Connection refused on translate |
Ollama not running | LLM / Ollama |
| Tests failing in CI | Missing env vars | Test Failures |
Error: OSError: cannot load library 'pango' / cairo
Fix: You are missing system libraries for WeasyPrint.
# macOS
brew install cairo pango gdk-pixbuf glib
export DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH"
# Ubuntu
sudo apt-get install python3-cairo python3-pango libgdk-pixbuf2.0-dev libffi-devNote: On macOS, add the DYLD_LIBRARY_PATH export to your ~/.zshrc for persistence.
Error: gTTSError: 429 (Too Many Requests)
Fix: Google TTS is rate-limiting you.
- Wait 10 minutes.
- Or skip audio:
--override-formats pdf,html,txt,md
Error: uv: command not found
Fix: Install uv:
curl -LsSf https://astral.sh/uv/install.sh | shError: ModuleNotFoundError: No module named 'src'
Fix: Always run from the software/ directory!
cd software
uv run ...Error: No matching version found for a dependency
Fix: Update the lockfile:
uv lock
uv sync --extra devError: Connection refused when running translation or course generation
Fix: Ensure Ollama is running:
ollama serveError: Translation timeout on large files
Fix: Increase timeout or use a faster/smaller model:
export OLLAMA_TIMEOUT=300
export OLLAMA_MODEL=llama3.2:1bError: PDF-related tests fail on macOS
Fix: Ensure DYLD_LIBRARY_PATH is set:
DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH" uv run pytest tests/ -vError: Tests marked requires_internet fail
Fix: These tests need network access. Skip them in offline environments:
uv run pytest tests/ -v -m "not requires_internet"Error: test_real_implementations.py fails
Fix: This test verifies the No Mocks policy. If it fails, a dependency may have introduced mock objects. Check recent changes to conftest.py and module imports.
Error: publish.py fails with FileNotFoundError
Fix: Ensure publish.toml exists at the repo root and the listed course paths are valid:
# Verify config
python publish.py --dry-runError: Stale outputs in published/
Fix: Enable clean output in publish.toml:
[options]
clean_output = trueOr manually clear:
rm -rf published/*
python publish.pyLast Updated: 2026-11-11