Documentation

Troubleshooting

Common issues and debugging paths for TraceLLM.

SQLite database not created

If you see a warning that traces are not being persisted, the most likely cause is that the SQLite database could not be created at ~/.tracellm/traces.db.

Why it happens:

TraceLLM uses SQLite to store trace data. The database file is auto-created at ~/.tracellm/traces.db on first run. If the home directory is not writable or the path cannot be created, persistence will fail.

How to fix it:

  1. Check that ~/.tracellm/ exists and is writable
  2. Create it manually: mkdir -p ~/.tracellm
  3. Restart the TraceLLM stack with tracellm start
Verify SQLite databaseCopy
bash
# Verify the database was created:
ls -la ~/.tracellm/traces.db

# Expected output: -rw-r--r--  ...  ~/.tracellm/traces.db

# Inspect tables:
sqlite3 ~/.tracellm/traces.db ".tables"

Tracey Troubleshooting

No environment variables are needed. The database is auto-created at ~/.tracellm/traces.db on first run. Just make sure your home directory is writable.

Common Issues

IssueCauseSolution
tracellm: command not foundPython bin directory not in PATHVerify pip install location and add to PATH: export PATH=$PATH:$HOME/.local/bin
ModuleNotFoundError: No module named 'tracellm'Package not installed or wrong environmentRun pip install tracellm-cli and check your virtual environment
SQLite database not created~/.tracellm/ directory is not writableCreate the directory manually: mkdir -p ~/.tracellm
Dashboard shows blank pageFrontend build issue or port conflictCheck browser console for errors, run tracellm start --dashboard-port 3001
WebSocket won't connectBackend not running on expected portEnsure tracellm start is running and check the port
Port 8000 already in useAnother process using the portUse tracellm start --port 8001
No traces in dashboardNo traces recorded or filter mismatchRun tracellm trace 'test' and check filters in dashboard
Trace persistence skippedSQLite database could not be createdCheck ~/.tracellm/ directory permissions, then restart the stack
ImportError for openai packageOpenAI extra not installedRun pip install 'tracellm[openai]' or pip install openai>=1.6.0
LangChain callback not capturing stepsCallbacks not passed in configAdd config={'callbacks': [handler]} to every chain/tool.invoke() call

Diagnostic Steps

If you encounter unexpected behavior, follow these diagnostic steps:

1

Check the Stack Status

Run tracellm start --check to verify all services are running. This performs health probes without keeping the process running.
2

Verify the Database

Check that ~/.tracellm/traces.db exists and that provider API keys (OPENAI_API_KEY, etc.) are correctly set.
3

Check Database Tables

Use sqlite3 ~/.tracellm/traces.db ".tables" to verify the traces table exists.
4

Generate a Test Trace

Run tracellm trace "diagnostic test" and check console output for the trace summary panel.
5

Replay the Trace

Use tracellm replay {trace_id} to verify the trace was persisted and can be reconstructed.

Getting Help

If the diagnostic steps do not resolve your issue:

  • Check the backend logs — the FastAPI server outputs detailed error messages to stderr
  • Run tracellm --version to confirm your installed version
  • Review the FAQ for additional answers

Info

When reporting issues, include the output of tracellm --version, your Python version, SQLite version, and the full error message for fastest resolution.