Troubleshooting
Troubleshooting¶
This guide helps you resolve common issues with LDA. If you don't find your issue here, please check our GitHub Issues or ask in Discussions.
Installation Issues¶
Permission Denied¶
If you encounter permission errors during installation:
Solution 1: Install with --user flag
Solution 2: Use a virtual environment
python -m venv lda-env
source lda-env/bin/activate # On Windows: lda-env\Scripts\activate
pip install lda-tool
Python Version Error¶
LDA requires Python 3.8 or higher.
Check your Python version:
Solutions: 1. Upgrade Python to 3.8+ 2. Use pyenv to manage multiple Python versions:
Module Not Found¶
If LDA module is not found after installation:
Solution 1: Update pip and reinstall
Solution 2: Check Python path
Configuration Issues¶
Invalid Configuration File¶
Error: ConfigurationError: Invalid configuration file
Common causes: 1. YAML syntax errors 2. Missing required fields 3. Invalid field values
Debug steps:
# Validate YAML syntax
python -c "import yaml; yaml.safe_load(open('lda_config.yaml'))"
# Check configuration
lda validate config
Missing Placeholders¶
Error: MissingPlaceholderError: Missing placeholder values
Solution: Define all required placeholders
File Tracking Issues¶
Hash Mismatch¶
Error: Hash mismatch for file: data.csv
Causes: 1. File modified outside LDA 2. Different line endings (Windows/Unix) 3. Encoding issues
Solutions:
# Update hash
lda track data.csv --force
# Check file encoding
file -i data.csv
# Fix line endings
dos2unix data.csv # Unix
unix2dos data.csv # Windows
Large File Tracking¶
Error: MemoryError when tracking large files
Solution: Configure chunk processing
Permission Denied on Manifest¶
Error: PermissionError: [Errno 13] Permission denied: 'manifest.json'
Solutions:
# Fix permissions
chmod 644 manifest.json
# Check file ownership
ls -la manifest.json
# If locked by another process
lsof manifest.json
CLI Issues¶
Command Not Found¶
Error: bash: lda: command not found
Solutions:
-
Add to PATH:
-
Use full path:
-
Reinstall with pipx:
Verbose Output Not Working¶
Issue: --verbose flag doesn't show detailed output
Solution: Set log level
Performance Issues¶
Slow File Tracking¶
Symptoms: Tracking takes too long for many files
Solutions:
-
Enable parallel processing:
-
Use faster hash algorithm:
-
Exclude unnecessary files:
High Memory Usage¶
Solutions:
-
Limit memory usage:
-
Process files in batches:
Integration Issues¶
Git Integration¶
Issue: Git commits fail after LDA tracking
Solution: Configure git hooks properly
# Install LDA git hooks
lda git install-hooks
# Or manually create pre-commit hook
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
lda validate --strict
EOF
chmod +x .git/hooks/pre-commit
Database Connection¶
Error: DatabaseError: could not connect to server
Debug steps:
# Test connection
psql -h localhost -U lda_user -d lda_db
# Check environment variables
echo $DATABASE_URL
# Verify configuration
lda debug db-test
Platform-Specific Issues¶
Windows¶
Path Separators¶
Issue: Incorrect path separators
Solution: Use forward slashes or raw strings
Line Endings¶
Issue: CRLF vs LF issues
Solution: Configure Git
macOS¶
SSL Certificate Error¶
Error: SSL: CERTIFICATE_VERIFY_FAILED
Solution:
Linux¶
Missing Dependencies¶
Error: ImportError: libpython3.8.so.1.0
Solution:
Debug Mode¶
Enable debug mode for detailed diagnostics:
# Set debug environment variable
export LDA_DEBUG=1
# Run with debug output
lda --debug status
# Generate debug report
lda debug report --output debug_report.txt
Common Error Messages¶
FileNotFoundError¶
Possible causes: - File doesn't exist - Wrong working directory - Incorrect path in config
Debug:
JSONDecodeError¶
Possible causes: - Corrupted manifest.json - Invalid JSON syntax
Fix:
TimeoutError¶
Possible causes: - Network issues - Large file operations - Slow external services
Solution:
Getting Help¶
If you're still experiencing issues:
-
Search existing issues:
-
Create detailed bug report:
-
Ask for help:
- GitHub Discussions
-
Report new issue:
- Use issue template
- Include debug report
- Provide minimal example
See Also¶
- Installation - Installation guide
- Configuration - Configuration reference
- Contributing - How to contribute