Chapter 9: Troubleshooting and FAQ¶
Quick Diagnostics¶
Health Check Commands¶
Start with these commands to identify issues:
# Comprehensive system check
virginia-clemm-poe doctor
# Check current status
virginia-clemm-poe status
# Test basic functionality
virginia-clemm-poe search "test"
# Clear cache if issues persist
virginia-clemm-poe clear-cache
Common Issue Indicators¶
Symptom | Likely Cause | Quick Fix |
---|---|---|
"No model data found" | Missing or corrupted data file | virginia-clemm-poe update |
"POE_API_KEY not set" | Missing API key | export POE_API_KEY=your_key |
"Browser not available" | Chrome not installed | virginia-clemm-poe setup |
"Cannot reach poe.com" | Network connectivity | Check internet/proxy settings |
Slow updates | Resource constraints | Reduce concurrent limit |
Installation Issues¶
Python Version Problems¶
Error: Package requires Python 3.12+
Solution:
# Check current version
python --version
# Install Python 3.12+ using pyenv
curl https://pyenv.run | bash
pyenv install 3.12.0
pyenv global 3.12.0
# Or use system package manager
# Ubuntu/Debian:
sudo apt update && sudo apt install python3.12
# macOS:
brew install python@3.12
Package Installation Failures¶
Error: pip install virginia-clemm-poe fails
Common causes and solutions:
-
Outdated pip:
-
Network issues:
-
Permission errors:
-
Dependency conflicts:
Browser Setup Issues¶
Error: Failed to install browser dependencies
Solutions:
-
Manual Chrome installation:
# Ubuntu/Debian wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' sudo apt update && sudo apt install google-chrome-stable # macOS brew install --cask google-chrome # Windows # Download from https://www.google.com/chrome/
-
Check disk space:
-
Permissions:
API and Authentication Issues¶
API Key Problems¶
Error: Invalid API key
or Authentication failed
Solutions:
-
Verify API key format:
-
Get new API key:
- Visit https://poe.com/api_key
- Generate new key
-
Update environment variable
-
Check key permissions:
- Ensure key has model listing permissions
- Some keys may be rate-limited
Network Connectivity Issues¶
Error: Cannot reach poe.com
or Connection timeout
Solutions:
-
Test connectivity:
-
Proxy configuration:
-
Corporate firewall:
- Contact IT for API access approval
- Use corporate proxy settings
-
Consider VPN if needed
-
DNS issues:
Browser and Scraping Issues¶
Browser Launch Failures¶
Error: Failed to get browser
or Chrome process exited
Solutions:
-
Check Chrome installation:
-
Port conflicts:
-
Insufficient resources:
-
Headless mode issues:
Scraping Timeouts¶
Error: Navigation timeout
or Element not found
Solutions:
-
Increase timeouts:
-
Reduce concurrency:
-
Network delays:
-
Debug specific models:
Anti-Bot Detection¶
Error: Access denied
or Captcha required
Solutions:
-
Rate limiting:
-
User agent rotation:
-
Proxy rotation:
-
Wait and retry:
Performance Issues¶
Slow Updates¶
Problem: Updates take too long
Solutions:
-
Increase concurrency (if resources allow):
-
Selective updates:
-
Cache optimization:
Memory Issues¶
Error: Out of memory
or system becomes unresponsive
Solutions:
-
Reduce memory usage:
-
Enable garbage collection:
-
Clear browser cache:
-
Process batching:
High CPU Usage¶
Problem: Process uses too much CPU
Solutions:
-
Reduce browser instances:
-
Add delays:
-
Lower priority:
Data Issues¶
Corrupted Data File¶
Error: Invalid JSON
or Validation error
Solutions:
-
Restore from backup:
-
Force fresh update:
-
Validate data manually:
Missing or Incomplete Data¶
Problem: Some models missing pricing or bot info
Solutions:
-
Force update specific areas:
-
Check for errors:
-
Manual verification:
from virginia_clemm_poe import api # Check data completeness models = api.get_all_models() need_update = api.get_models_needing_update() print(f"Total models: {len(models)}") print(f"Need update: {len(need_update)}") # List models with errors for model in models: if model.pricing_error: print(f"{model.id}: {model.pricing_error}")
Environment-Specific Issues¶
Docker Issues¶
Problem: Browser doesn't work in container
Solutions:
-
Add required arguments:
-
Install dependencies:
-
Use privileged mode:
CI/CD Issues¶
Problem: Automated runs fail
Solutions:
-
CI-specific configuration:
-
GitHub Actions example:
-
Handle rate limits:
Windows-Specific Issues¶
Problem: Path or permission issues on Windows
Solutions:
-
Use PowerShell:
-
Fix path issues:
-
Antivirus exclusions:
- Add virginia-clemm-poe cache directory to exclusions
- Temporarily disable real-time protection
Debugging Techniques¶
Enable Debug Logging¶
# Maximum verbosity
export VCP_LOG_LEVEL="DEBUG"
virginia-clemm-poe update --verbose 2>&1 | tee debug.log
# Structured logging
export VCP_STRUCTURED_LOGGING="true"
virginia-clemm-poe update --verbose
Browser Debugging¶
# Save screenshots and page content
export VCP_SAVE_SCREENSHOTS="true"
export VCP_SAVE_PAGE_CONTENT="true"
virginia-clemm-poe update --verbose
# Check saved files
ls ~/.local/share/virginia-clemm-poe/debug/
Network Debugging¶
# Monitor network traffic
export VCP_LOG_REQUESTS="true"
virginia-clemm-poe update --verbose
# Use proxy for inspection
export HTTP_PROXY="http://localhost:8080" # Burp Suite or similar
virginia-clemm-poe update
Memory Debugging¶
from virginia_clemm_poe.utils.memory import enable_memory_profiling
# Enable memory profiling
enable_memory_profiling()
# Run operation
virginia-clemm-poe update --verbose
# Check memory report
cat ~/.local/share/virginia-clemm-poe/logs/memory_profile.log
Getting Help¶
Information to Gather¶
When seeking help, provide:
-
System information:
-
Error logs:
-
Configuration:
Support Channels¶
- GitHub Issues: Create detailed issue
- Documentation: Check official docs
- Community: Join discussions and ask questions
Bug Report Template¶
## Bug Description
Brief description of the issue
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- OS:
- Python version:
- Virginia Clemm Poe version:
- Browser:
## Logs
```bash
# Paste relevant logs here
Configuration¶
Additional Context¶
Any other relevant information ```
Frequently Asked Questions¶
General Questions¶
Q: How often should I update the model data? A: Weekly updates are usually sufficient. More frequent updates may be needed when new models are released.
Q: Can I use this without a Poe API key? A: No, the API key is required to fetch the initial model list from Poe.com.
Q: Is it safe to run multiple update processes simultaneously? A: No, this can cause data corruption. Use the built-in concurrency controls instead.
Q: Why are some models missing pricing data? A: Some models may have pricing errors, be in beta, or have updated page layouts that the scraper doesn't recognize yet.
Technical Questions¶
Q: How much data does the package store locally? A: Typically 2-10MB for the complete dataset, depending on the number of models.
Q: Can I customize the scraping selectors? A: Yes, through configuration files or environment variables (see Chapter 8).
Q: How do I integrate with my existing data pipeline? A: See the integration examples in Chapter 8 for database and API integrations.
Q: What happens if Poe.com changes their website structure? A: The scraper may fail for new layouts. Update to the latest version or report the issue.
Performance Questions¶
Q: Why is the first update so slow? A: The first update scrapes all models. Subsequent updates only process changed models.
Q: How can I speed up updates? A: Increase concurrency limits, use selective updates (--pricing or --info), and ensure good network connectivity.
Q: Does the package cache data? A: Yes, it uses multiple cache layers for API responses, scraping results, and processed data.
This comprehensive troubleshooting guide should help resolve most issues you might encounter with Virginia Clemm Poe.