This guide provides solutions to common issues you might encounter while using XQR.
Error: ModuleNotFoundError: No module named 'module_name'
Solution: Install the required Python packages:
pip install -r requirements.txt
Error: OSError: Failed to execute...
or similar system command errors
Solution: Ensure all system dependencies are installed:
sudo apt-get update
sudo apt-get install -y poppler-utils tesseract-ocr pdf2svg python3-magic libmagic1
brew install poppler tesseract pdf2svg libmagic
Error: FileNotFoundError: [Errno 2] No such file or directory
Solution: Verify the file path is correct and the file exists:
ls -l /path/to/your/file
Error: PermissionError: [Errno 13] Permission denied
Solution: Check file permissions and ownership:
ls -l /path/to/file
chmod +x /path/to/file # If executable permission is needed
chown youruser:yourgroup /path/to/file # Change ownership if needed
Symptom: PDF files are generated but cannot be opened or are corrupted
Solution:
xqr convert input.svg output.pdf --dpi 300
Symptom: Text is not being extracted correctly from PDFs
Solution:
xqr convert input.pdf output.svg --dpi 600
xqr convert input.pdf output.svg --ocr-engine tesseract
Symptom: Operations take too long to complete
Solutions:
xqr process large.xml --chunk-size 100
xqr convert input.svg output.pdf --no-metadata
find . -name "*.svg" | parallel -j 4 "xqr convert {} {.}.pdf"
Cause: The XPath expression is not valid
Solution:
xqr query --debug file.xml "xpath"
for more detailsCause: No elements match the specified XPath
Solution:
Use the -v
or --verbose
flag for more detailed output:
xqr -v convert input.svg output.pdf
Use the --keep-temp
flag to preserve temporary files for debugging:
xqr convert input.svg output.pdf --keep-temp
If you’re still experiencing issues:
XQR Version | Python Versions | Notes |
---|---|---|
1.0.x | 3.8+ | Initial release |
2.0.x | 3.9+ | Added parallel processing |
For additional support, please contact: