- Add small portraits (24px) next to timeline events for person events - Add larger portraits (120px) in tooltips when hovering over events - Implement portrait loading from Gramps media_list using media_path_full - Add portrait drawing using Cairo with circular clipping and border - Update demo family generator to create portraits using DiceBear Avatars API - Generate portraits considering age and gender for appropriate appearance - Add media objects to XML with proper IDs and gallery references - Use relative paths for media files in demo family XML - Add helper scripts for debugging Gramps log files - Fix deprecation warnings for XML element truth value checks
2.1 KiB
2.1 KiB
Gramps Logging and Media Import Debugging
This directory contains scripts to help debug media import issues in Gramps.
Scripts
1. check_gramps_logs.sh
Checks for existing Gramps log files and displays media-related errors and messages.
Usage:
./check_gramps_logs.sh
This script will:
- Check for log files in the snap directory
- Display media-related errors and warnings
- Show recent log entries
- Check alternative log file locations
2. run_gramps_with_logging.sh
Runs Gramps with debug logging enabled and monitors the log file in real-time.
Usage:
./run_gramps_with_logging.sh
This script will:
- Start Gramps with debug logging for media and import operations
- Monitor the log file as it's created
- Display log entries in real-time
How to Debug Media Import Issues
-
Run Gramps with logging:
./run_gramps_with_logging.sh -
In Gramps:
- Import the
demo_family.grampsfile - Note any error messages in the Gramps UI
- Close Gramps when done
- Import the
-
Check the logs:
./check_gramps_logs.sh -
Look for:
- Media file path errors
- Import errors
- File not found messages
- Permission errors
Manual Log File Location
For Gramps installed via snap, log files are located at:
~/snap/gramps/11/.config/gramps/gramps60/logs/Gramps60.log
Common Issues
Media files not found
- Check that the
portraits/directory is in the same directory asdemo_family.gramps - Verify file paths in the XML are relative (e.g.,
portraits/portrait_0001_John_Smith.svg) - Set the base media path in Gramps: Edit → Preferences → Family Tree → Base media path
Import errors
- Check the log file for specific error messages
- Verify XML structure is valid
- Ensure all media objects have proper
idattributes
Enabling Logging Manually
If you prefer to run Gramps manually with logging:
gramps --debug=gramps.gen.lib.media \
--debug=gramps.plugins.import.importxml \
--debug=gramps.gen.db
Or enable all logging:
gramps --debug=all