mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
3.9 KiB
3.9 KiB
MiLB Manager Troubleshooting Guide
Issue Summary
The MiLB manager is no longer pulling accurate game information due to several factors, primarily the current offseason period.
Root Causes
1. Primary Issue: MiLB Offseason
- Problem: MiLB season runs from April to September
- Current Status: We're in January 2025 (offseason)
- Impact: No regular season games are scheduled during offseason
- Solution: Enable test mode for offseason testing
2. Secondary Issues
- API Endpoint Changes: MLB Stats API endpoints may have changed
- Sport ID Updates: Some sport IDs might be outdated
- Team Mapping: Team abbreviations may have changed
Solutions Implemented
Immediate Fix: Enable Test Mode
{
"milb": {
"test_mode": true
}
}
Code Improvements
- Season Awareness: Added offseason detection
- Better Logging: More informative error messages
- Test Mode Enhancement: Improved test data
Diagnostic Tools Created
1. Basic API Test
python test/test_milb_api.py
2. Comprehensive Diagnostic
python test/diagnose_milb_issues.py
Testing the Fixes
Step 1: Run Diagnostic
cd /path/to/LEDMatrix
python test/diagnose_milb_issues.py
Step 2: Test with Test Mode
- Ensure
test_mode: truein config - Restart the display system
- Check if test games appear
Step 3: Verify API (When Season Returns)
python test/test_milb_api.py
Expected Behavior
During Offseason (October-March)
- No real games found
- Test mode shows sample games
- Logs indicate offseason status
During Season (April-September)
- Real games should be found
- Live games display correctly
- Upcoming games show properly
Configuration Options
Test Mode
{
"milb": {
"test_mode": true,
"enabled": true
}
}
Season Override (For Testing)
{
"milb": {
"test_mode": true,
"force_season": true
}
}
Common Issues and Solutions
Issue: No Games Found
- Cause: Offseason or API issues
- Solution: Enable test mode
Issue: API Errors
- Cause: Network or endpoint issues
- Solution: Check internet connection and API status
Issue: Wrong Team Names
- Cause: Team mapping outdated
- Solution: Update
milb_team_mapping.json
Issue: Wrong Sport IDs
- Cause: MLB API changes
- Solution: Update sport IDs in config
Monitoring and Logs
Key Log Messages
"MiLB is currently in offseason"- Normal during offseason"Using test mode data for MiLB"- Test mode active"No games returned from API"- API issue or offseason
Debug Mode
Enable debug logging to see detailed API calls:
logger.setLevel(logging.DEBUG)
Future Improvements
Planned Enhancements
- Season Schedule Integration: Use official season dates
- API Fallback: Multiple API endpoints
- Caching Improvements: Better cache management
- Error Recovery: Automatic retry mechanisms
Configuration Enhancements
{
"milb": {
"season_start_month": 4,
"season_end_month": 9,
"api_fallback": true,
"cache_duration": 3600
}
}
Contact and Support
For additional issues:
- Run the diagnostic tools
- Check the logs for specific errors
- Verify network connectivity
- Test API endpoints directly
Quick Reference
Enable Test Mode
# Edit config/config.json
# Change "test_mode": false to "test_mode": true
Run Diagnostics
python test/diagnose_milb_issues.py
Test API Directly
python test/test_milb_api.py
Check Season Status
- April-September: Season active
- October-March: Offseason (use test mode)