Troubleshooting¶
Common issues you might encounter when using studiorum and how to resolve them. Check the list of known issues first.
Quick Diagnosis¶
Before diving into specific issues, try these quick diagnostic steps:
# Check configuration, data sources and cache
studiorum doctor
# Verify installation
studiorum --version
# Test basic functionality
studiorum list creatures --limit 1
If these basic commands fail, start with Installation Issues.
Common Errors¶
"Content not found" Errors¶
Error: Content not found: Ancient Red Dragon
Quick Fix:
# Check exact name
studiorum list creatures | grep -i "red dragon"
# Use exact match
studiorum convert creatures "Ancient Red Dragon"
See: Missing Source Data for detailed solutions.
LaTeX Compilation Errors¶
Error: ! LaTeX Error: File not found or pdflatex: command not found
Quick Fix:
See: LaTeX Installation and LaTeX Compilation Failures.
Image Processing Failures¶
Error: Images missing from output or Image processing failed
Quick Fix:
# Check image directory
echo $STUDIORUM_IMAGE__IMAGE_DIRECTORY
# Test with simple command
studiorum convert items "Bag of Holding" --images
See: Image Issues for comprehensive solutions.
MCP Connection Problems¶
Error: Claude Desktop reports that the studiorum server failed or disconnected.
Quick Fix: run the command from your Claude Desktop configuration in a terminal, for example uv run --directory /path/to/studiorum studiorum mcp run. It should wait silently for input; if it exits, its error names the problem.
See: MCP Server Issues.
Installation Issues¶
Python Version Compatibility¶
Problem: studiorum requires Python 3.12+ error
Solution: Install Python 3.12 or later:
Missing Dependencies¶
Problem: ModuleNotFoundError for required packages
Solution: Reinstall with all dependencies:
# Clean installation
pip uninstall studiorum
pip install studiorum[all]
# Or with uv
uv add studiorum --extra all
LaTeX Installation¶
Problem: pdflatex not found error
Solution: Install a LaTeX distribution:
Content Issues¶
Missing Source Data¶
Problem: Content not found: Ancient Red Dragon
Solution:
- Check the configured data:
- Update content index:
- Verify exact naming:
Outdated Content¶
Problem: Missing newly released content
Solution: Update to the latest content:
# Update the 5etools checkout the configuration names
git -C ~/Code/5etools-src pull
# Check the configured data
studiorum data show
# Verify new content
studiorum list adventures --recent
Permission Errors¶
Problem: Permission denied when accessing content files
Solution: Fix file permissions:
# Make content directory readable
chmod -R 755 ~/.studiorum/content/
# Reset ownership
sudo chown -R $USER ~/.studiorum/
Conversion Errors¶
LaTeX Compilation Failures¶
Problem: LaTeX compilation errors during PDF generation
Solution:
- Generate LaTeX only to debug:
- Check LaTeX log for specific errors:
- Try different compiler:
-
Common LaTeX fixes:
-
Missing packages: Install required LaTeX packages
-
Unicode issues: Use XeLaTeX or LuaLaTeX for Unicode content
-
Memory issues: Increase LaTeX memory limits
Memory Issues¶
Problem: MemoryError during large conversions
Solution:
- Increase system limits:
- Process in chunks:
# Convert creatures by CR range
for cr in {1..5} {6..10} {11..15} {16..20}; do
studiorum convert creatures --cr $cr --output "cr_$cr.tex"
done
- Use streaming mode:
Encoding Issues¶
Problem: UnicodeDecodeError or garbled text
Solution:
- Set UTF-8 encoding:
- Use proper LaTeX packages:
- Clean problematic characters:
Performance Issues¶
Slow Conversion¶
Problem: Conversions take too long
Solution:
- Enable caching:
- Use parallel processing:
- Optimize sources:
- Profile performance:
High Memory Usage¶
Problem: System becomes unresponsive during conversion
Solution:
- Monitor usage:
# Watch memory usage during conversion
studiorum convert adventure "Large Campaign" &
watch -n 1 'ps aux | grep studiorum'
- Tune garbage collection:
- Use incremental processing:
Image Issues¶
Images Not Appearing¶
Problem: The .tex has % Image placeholder or % Image not found comments instead of images
Solution:
- Placeholders mean images are off. Pass
--images, or setimage.include_images: true. Fluff images also need--fluff --with-fluff-images. - "Image not found" means the file isn't under
image.image_directory. Studiorum looks in~/Code/5etools-imgunless you set another checkout:
- A warning that an image "could not be converted to PNG" means Pillow couldn't read the file. Check it opens:
See Images for how images are found, converted and placed.
MCP Server Issues¶
Experimental Feature
The MCP server is new. Report problems on GitHub.
- The client can't start the server. Check the command in your client configuration against MCP Integration, then run it in a terminal. A missing configuration file or data directory stops it at start-up with an error.
- A tool finds nothing. The content tools default to
srd_only=true, which leaves out entries 5etools doesn't mark as SRD. Passsrd_only=false, or check the data directories withstudiorum data show. get_contentsays a name wasn't found. The error lists the closest names. The search tools match any part of a name, so use them to find the exact one.- Logs. The server logs to stderr. Claude Desktop keeps each server's stderr in its log directory (on macOS,
~/Library/Logs/Claude/).
Configuration Issues¶
Invalid Configuration¶
Problem: Invalid configuration error on startup
Solution:
- Validate YAML syntax:
- Reset to defaults:
# Backup current config
mv ~/.studiorum/config.yaml ~/.studiorum/config.yaml.backup
# Generate new default config
studiorum config init
- Check the configuration:
Path Issues¶
Problem: FileNotFoundError for configuration or content files
Solution:
- Check environment variables:
- Create missing directories:
- Fix permissions:
Getting Help¶
Collecting Debug Information¶
When reporting issues, include:
# System information
studiorum version --detailed
# Configuration
studiorum config show --sanitized
# Environment
env | grep STUDIORUM
# Recent logs
studiorum logs --tail 100 --level ERROR
Performance Profiling¶
For performance issues:
# Generate performance profile
studiorum convert creature "Beholder" --profile --output beholder-profile.json
# Analyze profile
studiorum profile analyze beholder-profile.json
Community Support¶
- GitHub Issues: Report bugs and feature requests
- Discussions: Community Q&A and troubleshooting
- Discord: Join our community server for real-time help
Prevention¶
Regular Maintenance¶
Prevent common issues:
#!/bin/bash
# ~/.studiorum/maintenance.sh
# Clean old temporary files
find ~/.studiorum/temp -type f -mtime +7 -delete
# Check the configured data
studiorum data show
# Rebuild index if needed
if [ -z "$(find ~/.studiorum/index -name '*.db' -mtime -30)" ]; then
studiorum index rebuild --quiet
fi
# Clean cache if too large
cache_size=$(du -sm ~/.studiorum/cache | cut -f1)
if [ "$cache_size" -gt 1000 ]; then
studiorum cache clear --keep-recent 100
fi
Run monthly with cron:
Health Checks¶
Check the configuration, data sources and cache in one go:
It exits with status 1 if any check fails.