Troubleshooting
This guide covers common issues you might encounter when using the Algebras CLI and their solutions.
Installation Issues
Section titled “Installation Issues””command not found: algebras”
Section titled “”command not found: algebras””Cause: The CLI wasn’t added to your PATH after installation.
Solutions:
- Restart your terminal after installation
- Add pip user bin to PATH:
Terminal window echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcsource ~/.bashrc - Use full path:
Terminal window python -m algebras --version
Permission Denied Errors
Section titled “Permission Denied Errors”Cause: Insufficient permissions to install packages globally.
Solutions:
- Use —user flag:
Terminal window pip install --user algebras-cli - Use virtual environment:
Terminal window python -m venv algebras-envsource algebras-env/bin/activate # On Windows: algebras-env\Scripts\activatepip install git+https://github.com/algebras-ai/algebras-cli.git
Python Version Issues
Section titled “Python Version Issues”Cause: Using an outdated Python version.
Solutions:
- Check Python version:
Terminal window python --version - Upgrade Python to version 3.8 or higher
- Use specific Python version:
Terminal window python -m pip install git+https://github.com/algebras-ai/algebras-cli.git
Configuration Issues
Section titled “Configuration Issues””No Algebras configuration found”
Section titled “”No Algebras configuration found””Cause: No .algebras.config file exists in the current directory.
Solutions:
- Run init command:
Terminal window algebras init - Ensure you’re in the correct project directory
- Check if config file exists:
Terminal window ls -la .algebras.config
“Language ‘xx’ is not configured”
Section titled ““Language ‘xx’ is not configured””Cause: The specified language is not in your configuration.
Solutions:
- Add the language:
Terminal window algebras add xx - Check available languages:
Terminal window algebras status - Verify language code format (e.g.,
pt_BRnotpt-BR)
“No source files found”
Section titled ““No source files found””Cause: No source files match your configuration.
Solutions:
- Check source file paths in
.algebras.config - Run init to regenerate configuration:
Terminal window algebras init --force - Verify files exist:
Terminal window ls -la src/locales/en/ - Check file permissions
Configuration Validation Errors
Section titled “Configuration Validation Errors”Cause: Invalid YAML syntax or configuration values.
Solutions:
- Check YAML syntax:
Terminal window algebras status - Validate file paths exist
- Ensure language codes are valid
- Check for typos in configuration
API Issues
Section titled “API Issues””ALGEBRAS_API_KEY environment variable is not set”
Section titled “”ALGEBRAS_API_KEY environment variable is not set””Cause: API key not configured.
Solutions:
- Set your API key:
Terminal window export ALGEBRAS_API_KEY=your_api_key_here - Get your API key from the Algebras dashboard
- Add to shell profile for persistence:
Terminal window echo 'export ALGEBRAS_API_KEY=your_api_key_here' >> ~/.bashrc
“401 Unauthorized” API Error
Section titled ““401 Unauthorized” API Error”Cause: Invalid or missing API key.
Solutions:
- Verify API key is correct
- Check API key is set:
Terminal window echo $ALGEBRAS_API_KEY - Regenerate API key if needed
- Ensure no extra spaces in API key
”402 Payment Required” API Error
Section titled “”402 Payment Required” API Error”Cause: Quota exceeded or payment required.
Solutions:
- Check your account quota
- Upgrade your plan if needed
- Wait for quota reset (usually monthly)
- Contact support for quota issues
”500 Internal Server Error”
Section titled “”500 Internal Server Error””Cause: Server-side error.
Solutions:
- Retry the operation
- Check service status
- Reduce batch size if using batch processing
- Contact support if persistent
Translation Issues
Section titled “Translation Issues”Translation Quality Issues
Section titled “Translation Quality Issues”Cause: Poor translation quality or inconsistent terminology.
Solutions:
- Use UI-safe mode:
Terminal window algebras translate --ui-safe - Upload a glossary for consistent terminology
- Use custom prompts for specific requirements:
Terminal window algebras translate --prompt "Translate to {target_language} maintaining a professional tone" - Review and edit translations manually
Performance Issues
Section titled “Performance Issues”Cause: Slow translation processing.
Solutions:
- Adjust batch size:
Terminal window algebras translate --batch-size 10 - Control parallel batches:
Terminal window algebras translate --max-parallel-batches 3 - Use only-missing flag:
Terminal window algebras translate --only-missing - Check network connectivity
Rate Limit Errors
Section titled “Rate Limit Errors”Cause: Too many requests to the API.
Solutions:
- Reduce parallel batches:
Terminal window algebras translate --max-parallel-batches 1 - Increase batch size:
Terminal window algebras translate --batch-size 50 - Add delays between requests
- Upgrade your plan for higher limits
File System Issues
Section titled “File System Issues”Permission Denied Writing Files
Section titled “Permission Denied Writing Files”Cause: Insufficient permissions to write translation files.
Solutions:
- Check directory permissions:
Terminal window ls -la src/locales/ - Fix permissions:
Terminal window chmod 755 src/locales/ - Run with appropriate user permissions
File Not Found Errors
Section titled “File Not Found Errors”Cause: Source files don’t exist or paths are incorrect.
Solutions:
- Verify file paths in configuration
- Check file existence:
Terminal window find . -name "*.json" -path "*/en/*" - Update configuration with correct paths
- Regenerate configuration:
Terminal window algebras init --force
Git Integration Issues
Section titled “Git Integration Issues”Unnecessary Translations
Section titled “Unnecessary Translations”Cause: Git integration not working properly.
Solutions:
- Ensure source files are tracked in Git
- Check Git status:
Terminal window git status - Use only-missing flag:
Terminal window algebras translate --only-missing - Verify Git repository is properly initialized
Translation Files Not Committed
Section titled “Translation Files Not Committed”Cause: Translation files not added to Git.
Solutions:
- Add translation files:
Terminal window git add src/locales/ - Commit changes:
Terminal window git commit -m "Update translations" - Set up pre-commit hooks for automation
Getting Help
Section titled “Getting Help”Debug Information
Section titled “Debug Information”Enable verbose output for debugging:
algebras translate --verboseCheck Configuration
Section titled “Check Configuration”Validate your setup:
algebras statusLog Files
Section titled “Log Files”Check for log files in:
~/.algebras/logs/- Project directory logs
Support Resources
Section titled “Support Resources”- GitHub Issues - Report bugs or ask questions
- Documentation - Complete CLI reference
- Support Email - Get help from our team
- Community Forum - Community support
Reporting Issues
Section titled “Reporting Issues”When reporting issues, include:
- CLI version:
algebras --version - Python version:
python --version - Operating system
- Error messages (full output)
- Configuration file (remove sensitive data)
- Steps to reproduce
Prevention Tips
Section titled “Prevention Tips”Best Practices
Section titled “Best Practices”- Always test with a small subset first
- Use version control for all files
- Backup before major translations
- Monitor quotas and usage
- Use UI-safe mode for UI strings
- Set up glossaries for consistency
Regular Maintenance
Section titled “Regular Maintenance”- Update CLI regularly:
Terminal window pip install --upgrade algebras-cli - Review translations periodically
- Update glossaries as needed
- Monitor API usage
- Clean up old files
Next Steps
Section titled “Next Steps”- CLI Commands - Complete command reference
- Advanced Features - Explore advanced capabilities
- Configuration - Detailed configuration options