Replace 5 bare except clauses with 'except Exception:' to improve
error handling and prevent catching system exits and keyboard interrupts:
- gui.py:155 - Queue event processing
- setup_wizard.py:184 - API response parsing
- test_credentials.py:213 - Response JSON parsing
- test_credentials.py:240 - Error response parsing
- test_credentials.py:257 - Response text formatting
This change improves code quality and follows Python best practices
for exception handling.
This commit adds robust diagnostic tools to help users identify and fix
authentication issues with Twitch OAuth and Perplexity API.
New Features:
- test_credentials.py: Comprehensive credential validator with detailed diagnostics
- Tests Twitch OAuth token with IRC authentication
- Validates Perplexity API key and model access
- Provides specific error messages and actionable fixes
- Automatically tests fallback models (sonar-pro → sonar)
- TROUBLESHOOTING.md: Complete troubleshooting guide
- Common error messages and solutions
- Step-by-step diagnostic procedures
- Quick reference for file locations and commands
Improvements to setup_wizard.py:
- Enhanced Twitch token validation with detailed error messages
- Added Perplexity model fallback (sonar-pro → sonar)
- Better error handling with specific solutions
- Recommends working model if primary model unavailable
Documentation Updates:
- README.md: Added credential testing section with examples
- CLAUDE.md: Updated with new tools and testing procedures
- Comprehensive troubleshooting section in README
This addresses the common authentication failures users encounter during
initial setup and provides clear paths to resolution.
Changes:
- Create setup_wizard.py with interactive configuration flow
- Validates Twitch OAuth token via IRC test
- Validates Perplexity API key with test request
- Guides user through all required settings
- Creates .env file and necessary directories
- Update config.py system prompt to reflect Kene's personality
- Bot now responds AS Kene (first person)
- Includes tech expertise (Bambu X1C, H2C, coding/bots)
- Reflects political stance (left-leaning, anti-right)
- Maintains authentic conversational style
- Update README.md with setup wizard instructions
- Clear step-by-step for Option 1 (wizard)
- Lists wizard features and benefits