Troubleshooting
Common issues and how to fix them.
Common Issues
Command not found: wtp
The wtp command isn't in your PATH.
Solution
Add ~/.local/bin to your PATH. Add this to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
Then restart your terminal or run source ~/.bashrc
API Key Invalid / Authentication Failed
The AI engine can't authenticate with your API key.
Solution
- Check your API key in
~/.whatthepatch/config.yaml - Make sure there are no extra spaces or quotes around the key
- Verify the key is valid at your provider's dashboard
- Run
wtp --test-configto verify
Model not found
The specified model doesn't exist or isn't available.
Solution
Run wtp --switch-model to select a valid model, or check your provider's documentation for available models.
GitHub/Bitbucket 401/403 Error
Can't access the PR - authentication issue.
Solution
- For private repos, add your token to
config.yaml:
config.yaml
tokens:
github: "ghp_your_token_here"
bitbucket_username: "your-username"
bitbucket_app_password: "your-app-password"
SSL/urllib3 Warning
SSL warning appears on some Python/OS combinations.
Solution
This warning doesn't affect functionality. To suppress it, add to your config.yaml:
suppress_ssl_warning: true
Missing Dependencies After Update
Import errors after running --update.
Solution
Install the updated dependencies:
pip install -r ~/.whatthepatch/requirements.txt
Diagnostic Commands
Terminal
# Check current configuration
wtp --status
# Test AI engine connection
wtp --test-config
# Preview without API call
wtp --review <PR_URL> --dry-run --verbose
# Check version
wtp --version
Getting Help
If you're still having issues:
- Check the full troubleshooting guide
- Search existing issues
- Open a new issue with:
- Output of
wtp --version - Your OS and Python version
- The error message
- Steps to reproduce
- Output of