Skip to content

Troubleshooting

This guide covers common issues you might encounter when using the Algebras CLI and their solutions.

Cause: The CLI wasn’t added to your PATH after installation.

Solutions:

  1. Restart your terminal after installation
  2. Add pip user bin to PATH:
    Terminal window
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
  3. Use full path:
    Terminal window
    python -m algebras --version

Cause: Insufficient permissions to install packages globally.

Solutions:

  1. Use —user flag:
    Terminal window
    pip install --user algebras-cli
  2. Use virtual environment:
    Terminal window
    python -m venv algebras-env
    source algebras-env/bin/activate # On Windows: algebras-env\Scripts\activate
    pip install git+https://github.com/algebras-ai/algebras-cli.git

Cause: Using an outdated Python version.

Solutions:

  1. Check Python version:
    Terminal window
    python --version
  2. Upgrade Python to version 3.8 or higher
  3. Use specific Python version:
    Terminal window
    python -m pip install git+https://github.com/algebras-ai/algebras-cli.git

Cause: No .algebras.config file exists in the current directory.

Solutions:

  1. Run init command:
    Terminal window
    algebras init
  2. Ensure you’re in the correct project directory
  3. Check if config file exists:
    Terminal window
    ls -la .algebras.config

Cause: The specified language is not in your configuration.

Solutions:

  1. Add the language:
    Terminal window
    algebras add xx
  2. Check available languages:
    Terminal window
    algebras status
  3. Verify language code format (e.g., pt_BR not pt-BR)

Cause: No source files match your configuration.

Solutions:

  1. Check source file paths in .algebras.config
  2. Run init to regenerate configuration:
    Terminal window
    algebras init --force
  3. Verify files exist:
    Terminal window
    ls -la src/locales/en/
  4. Check file permissions

Cause: Invalid YAML syntax or configuration values.

Solutions:

  1. Check YAML syntax:
    Terminal window
    algebras status
  2. Validate file paths exist
  3. Ensure language codes are valid
  4. Check for typos in configuration

”ALGEBRAS_API_KEY environment variable is not set”

Section titled “”ALGEBRAS_API_KEY environment variable is not set””

Cause: API key not configured.

Solutions:

  1. Set your API key:
    Terminal window
    export ALGEBRAS_API_KEY=your_api_key_here
  2. Get your API key from the Algebras dashboard
  3. Add to shell profile for persistence:
    Terminal window
    echo 'export ALGEBRAS_API_KEY=your_api_key_here' >> ~/.bashrc

Cause: Invalid or missing API key.

Solutions:

  1. Verify API key is correct
  2. Check API key is set:
    Terminal window
    echo $ALGEBRAS_API_KEY
  3. Regenerate API key if needed
  4. Ensure no extra spaces in API key

Cause: Quota exceeded or payment required.

Solutions:

  1. Check your account quota
  2. Upgrade your plan if needed
  3. Wait for quota reset (usually monthly)
  4. Contact support for quota issues

Cause: Server-side error.

Solutions:

  1. Retry the operation
  2. Check service status
  3. Reduce batch size if using batch processing
  4. Contact support if persistent

Cause: Poor translation quality or inconsistent terminology.

Solutions:

  1. Use UI-safe mode:
    Terminal window
    algebras translate --ui-safe
  2. Upload a glossary for consistent terminology
  3. Use custom prompts for specific requirements:
    Terminal window
    algebras translate --prompt "Translate to {target_language} maintaining a professional tone"
  4. Review and edit translations manually

Cause: Slow translation processing.

Solutions:

  1. Adjust batch size:
    Terminal window
    algebras translate --batch-size 10
  2. Control parallel batches:
    Terminal window
    algebras translate --max-parallel-batches 3
  3. Use only-missing flag:
    Terminal window
    algebras translate --only-missing
  4. Check network connectivity

Cause: Too many requests to the API.

Solutions:

  1. Reduce parallel batches:
    Terminal window
    algebras translate --max-parallel-batches 1
  2. Increase batch size:
    Terminal window
    algebras translate --batch-size 50
  3. Add delays between requests
  4. Upgrade your plan for higher limits

Cause: Insufficient permissions to write translation files.

Solutions:

  1. Check directory permissions:
    Terminal window
    ls -la src/locales/
  2. Fix permissions:
    Terminal window
    chmod 755 src/locales/
  3. Run with appropriate user permissions

Cause: Source files don’t exist or paths are incorrect.

Solutions:

  1. Verify file paths in configuration
  2. Check file existence:
    Terminal window
    find . -name "*.json" -path "*/en/*"
  3. Update configuration with correct paths
  4. Regenerate configuration:
    Terminal window
    algebras init --force

Cause: Git integration not working properly.

Solutions:

  1. Ensure source files are tracked in Git
  2. Check Git status:
    Terminal window
    git status
  3. Use only-missing flag:
    Terminal window
    algebras translate --only-missing
  4. Verify Git repository is properly initialized

Cause: Translation files not added to Git.

Solutions:

  1. Add translation files:
    Terminal window
    git add src/locales/
  2. Commit changes:
    Terminal window
    git commit -m "Update translations"
  3. Set up pre-commit hooks for automation

Enable verbose output for debugging:

Terminal window
algebras translate --verbose

Validate your setup:

Terminal window
algebras status

Check for log files in:

  • ~/.algebras/logs/
  • Project directory logs
  1. GitHub Issues - Report bugs or ask questions
  2. Documentation - Complete CLI reference
  3. Support Email - Get help from our team
  4. Community Forum - Community support

When reporting issues, include:

  1. CLI version: algebras --version
  2. Python version: python --version
  3. Operating system
  4. Error messages (full output)
  5. Configuration file (remove sensitive data)
  6. Steps to reproduce
  1. Always test with a small subset first
  2. Use version control for all files
  3. Backup before major translations
  4. Monitor quotas and usage
  5. Use UI-safe mode for UI strings
  6. Set up glossaries for consistency
  1. Update CLI regularly:
    Terminal window
    pip install --upgrade algebras-cli
  2. Review translations periodically
  3. Update glossaries as needed
  4. Monitor API usage
  5. Clean up old files