Troubleshooting
Common Issues
Section titled “Common Issues”Installation Problems
Section titled “Installation Problems”Python Version Error
Section titled “Python Version Error”Symptom: SyntaxError or ModuleNotFoundError during installation
Solution:
# Check your Python versionpython3 --version
# Must be 3.10 or higher. If not:# macOSbrew install python@3.11
# Ubuntu/Debiansudo apt install python3.11
# Windows: Download from python.orgDependency Installation Fails
Section titled “Dependency Installation Fails”Symptom: pip install errors with compilation failures
# Install Xcode command line toolsxcode-select --install
# Try installation againpip install -r requirements.txt# Install build essentialssudo apt install build-essential python3-dev
# Fedorasudo dnf install gcc python3-devel
pip install -r requirements.txt# Install Visual C++ Build Tools from:# https://visualstudio.microsoft.com/visual-cpp-build-tools/
pip install -r requirements.txtAPI Key Issues
Section titled “API Key Issues”Invalid API Key
Section titled “Invalid API Key”Symptom: AuthenticationError or 401 Unauthorized
Solution:
- Verify your key at console.anthropic.com
- Check
.envfile format:Terminal window # CorrectANTHROPIC_API_KEY=sk-ant-api03-xxxxx# Wrong - has quotesANTHROPIC_API_KEY="sk-ant-api03-xxxxx"# Wrong - has spacesANTHROPIC_API_KEY = sk-ant-api03-xxxxx
Rate Limit Exceeded
Section titled “Rate Limit Exceeded”Symptom: RateLimitError or 429 Too Many Requests
Solution:
- Wait a few minutes before retrying
- Check your API usage at Anthropic console
- Consider upgrading your API tier
Channel Connection Issues
Section titled “Channel Connection Issues”Telegram Bot Not Responding
Section titled “Telegram Bot Not Responding”- Verify bot token is correct in
.env - Send
/startto your bot in Telegram - Check logs for errors:
Terminal window LOG_LEVEL=DEBUG python -m clawdbot - Ensure bot has privacy mode disabled (talk to @BotFather)
WhatsApp Connection Failed
Section titled “WhatsApp Connection Failed”Common causes:
- QR code expired - restart and scan again
- Session timeout - delete
.wwebjs_authfolder - Multiple devices - only one active session allowed
# Reset WhatsApp sessionrm -rf .wwebjs_auth/python -m clawdbot# Scan the new QR codeDiscord Bot Offline
Section titled “Discord Bot Offline”- Check bot token in
.env - Verify bot is added to your server with correct permissions
- Enable “Message Content Intent” in Discord Developer Portal:
- Go to your application
- Bot → Privileged Gateway Intents
- Enable “Message Content Intent”
Runtime Issues
Section titled “Runtime Issues”High Memory Usage
Section titled “High Memory Usage”Symptom: Clawdbot using excessive RAM
Solutions:
- Reduce conversation context length in config
- Restart Clawdbot periodically
- Limit number of active channels
# In .envMAX_CONTEXT_MESSAGES=50Slow Responses
Section titled “Slow Responses”Possible causes:
- API latency: Check Anthropic status page
- Network issues: Test your connection
- Large context: Reduce conversation history
# Test API directlycurl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-sonnet-4-20250514","max_tokens":100,"messages":[{"role":"user","content":"Hi"}]}'Unexpected Disconnections
Section titled “Unexpected Disconnections”Symptom: Bot disconnects randomly
Solutions:
- Check network stability
- Implement auto-restart:
Terminal window # Using supervisor or systemd# See Platform guides for details - Increase timeout settings if available
Debugging Tips
Section titled “Debugging Tips”Enable Debug Logging
Section titled “Enable Debug Logging”# Maximum verbosityLOG_LEVEL=DEBUG python -m clawdbot
# Save to fileLOG_LEVEL=DEBUG python -m clawdbot 2>&1 | tee clawdbot.logCheck Configuration
Section titled “Check Configuration”# Print loaded configpython -m clawdbot --config-checkTest Individual Components
Section titled “Test Individual Components”# Test Anthropic connectionpython -c "import anthropic; c = anthropic.Anthropic(); print(c.models.list())"
# Test Telegram connectionpython -c "import telegram; bot = telegram.Bot('YOUR_TOKEN'); print(bot.get_me())"Getting Help
Section titled “Getting Help”If your issue isn’t covered here:
- Search existing issues: GitHub Issues
- Ask the community: GitHub Discussions
- Report a bug: Include:
- Clawdbot version
- Python version
- Operating system
- Full error message/logs
- Steps to reproduce