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_eventsto check). - Session name misspelled (use
get_sessionsto check). - Data not yet available in the archive.
NetworkError
Error:NetworkError: Failed to fetch data from CDN
Solutions:
- Enable Debug Logging: See which CDN is failing.
- 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:- Async Loading: Use
await session.laps_async()to fetch all drivers in parallel. - Ultra Cold Start: For real-time apps, enable Ultra Cold Start in the
.tif1rcfile to skip validation and background-fill the cache.
High Memory Usage
Problem: Analyzing an entire season consumes too much RAM. Solutions:- Use Polars: It is significantly more memory-efficient than pandas.
- Categorical Types:
tif1automatically uses categoricals for columns likeDriverandTeam. 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: UnexpectedKeyError 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:- Check the GitHub Issues.
- Run with
logging.DEBUGand include the logs in the report. - Provide a minimal reproducible example (MRE).
Related Pages
FAQ
Common questions.
Error Handling
Handle errors.
Installation
Setup issues.