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
  1. Check your API key in ~/.whatthepatch/config.yaml
  2. Make sure there are no extra spaces or quotes around the key
  3. Verify the key is valid at your provider's dashboard
  4. Run wtp --test-config to 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
  1. 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: