Skip to main content

Installation Issues

DuckDB Import Error

Error: ModuleNotFoundError: No module named 'duckdb' Solution: DuckDB is an optional dependency for advanced analytics. Install it separately:

Data Access Issues

DataNotFoundError

Error: DataNotFoundError: Data not found for 2025/Abu Dhabi Grand Prix/Practice 1 Causes:
  • Event name misspelled (use get_events to check).
  • Session name misspelled (use get_sessions to check).
  • Data not yet available in the archive.
Solutions:

NetworkError

Error: NetworkError: Failed to fetch data from CDN Solutions:
  1. Enable Debug Logging: See which CDN is failing.
  1. Check CDN Status: The primary CDN is jsDelivr, with Hugging Face buckets and StaticDelivr as fallbacks. Make sure that the network does not block them.

Performance Issues

Slow Cold Start

Problem: The first load of a session takes several seconds. Solutions:
  1. Async Loading: Use await session.laps_async() to fetch all drivers in parallel.
  2. Ultra Cold Start: For real-time apps, enable Ultra Cold Start in the .tif1rc file to skip validation and background-fill the cache.

High Memory Usage

Problem: Analyzing an entire season consumes too much RAM. Solutions:
  1. Use Polars: It is significantly more memory-efficient than pandas.
  2. Categorical Types: tif1 automatically uses categoricals for columns like Driver and Team. Make sure that the code does not cast these columns back to strings.

Cache Issues

Cache Permissions

Error: OperationalError: attempt to write a readonly database Solution: Ensure tif1 can write to its cache directory. The default is Windows %LOCALAPPDATA%/Temp/tif1, macOS ~/Library/Caches/tif1, or Linux/other POSIX ~/.cache/tif1 (falling back to ~/.tif1). On shared systems, the directory should ideally have 0o700 permissions.

Corrupted Cache

Problem: Unexpected KeyError or InvalidDataError after a successful load. Solution: Wipe the local cache and re-download the data.

API & Schema Issues

Column Name KeyError

Error: KeyError: 'time' or KeyError: 'speed' Solution: tif1 uses PascalCase for all column names. Use LapTime instead of time, and Speed instead of speed.

Getting Help

If the problem persists:
  1. Check the GitHub Issues.
  2. Run with logging.DEBUG and include the logs in the report.
  3. Provide a minimal reproducible example (MRE).

FAQ

Common questions.

Error Handling

Handle errors.

Installation

Setup issues.
Last modified on September 8, 2026