Common Issues
Quick solutions to the most frequently encountered problems.Module not found errors
Module not found errors
Models not found when starting Flask
Models not found when starting Flask
Symptom:Cause: Models haven’t been trained yetSolution:
Low model accuracy
Low model accuracy
Symptom: Model test accuracy below 70%Possible Causes:
- Insufficient training data
- Poor feature engineering
- Overfitting or underfitting
- Data quality issues
- Collect More Data
- Add More Features
- Try Different Models
- Hyperparameter Tuning
Add more recent seasons to training data:More data → Better generalization
Flask won't start - port already in use
Flask won't start - port already in use
Symptom:Cause: Another process is using port 5000Solution:
- Kill Existing Process
- Use Different Port
Mac/Linux:Windows:
Data Issues
Missing or incomplete data
Missing or incomplete data
Symptom: CSV files have fewer rows than expected or missing columnsDebugging:Solutions:
- Re-collect Data
- Fill Missing Values
Data type errors
Data type errors
Symptom:Cause: Columns are wrong data type (string instead of numeric)Solution:
Duplicate rows in dataset
Duplicate rows in dataset
Symptom: More rows than expected, duplicate driver-race combinationsCheck for duplicates:
Performance Issues
Model training is too slow
Model training is too slow
Symptom: Training takes 30+ minutesSolutions:
- Reduce Data Size
- Optimize Hyperparameters
- Feature Selection
Web dashboard is slow to load
Web dashboard is slow to load
Symptom: Dashboard takes 10+ seconds to render predictionsSolutions:
-
Cache model predictions:
-
Optimize data loading:
-
Reduce plot complexity:
Debugging Tips
- Enable Debug Mode
- Check Data at Each Step
- Inspect Model Predictions
- Validate Feature Importance
Get detailed error messages:For training scripts:
Frequently Asked Questions
Why is accuracy lower on recent races?
Why is accuracy lower on recent races?
Answer: Models are trained on historical data (2018-2023). Recent regulatory changes, new drivers, or team performance shifts may not be fully captured.Solution: Retrain models with latest data:
Can I use this for betting?
Can I use this for betting?
Answer: While the model achieves 75-80% accuracy, it’s designed for educational purposes. Betting involves risk beyond prediction accuracy.
How do I add 2025/2026 data?
How do I add 2025/2026 data?
Answer: The FastF1 API updates automatically with new race data.Then retrain models with updated data.
Can I predict specific drivers?
Can I predict specific drivers?
Answer: Yes! The web dashboard allows driver-specific predictions, or use the API:
What Python version is required?
What Python version is required?
Answer: Python 3.8 or higher is required.
Error Messages Reference
- Import Errors
- File Errors
- Data Errors
- Model Errors
| Error | Cause | Solution |
|---|---|---|
No module named 'fastf1' | Package not installed | pip install fastf1 |
No module named 'sklearn' | Package not installed | pip install scikit-learn |
No module named 'xgboost' | Package not installed | pip install xgboost |
Cannot import name 'Sequential' | TensorFlow not installed | pip install tensorflow |
Getting Help
Check Documentation
Review the complete documentation:
- Installation guide
- API reference
- Model architecture
GitHub Issues
Search existing issues or create new one:
- Provide error messages
- Include Python/package versions
- Describe steps to reproduce
Debug Logs
Enable detailed logging:
Community Support
Join discussions:
- Share your issue
- Learn from others
- Contribute solutions