-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
Problem
Amplifier execution fails with module import error for pygments.lexers.data:
Error: No module named 'pygments.lexers.data'
Context
- Environment: uv tool installed amplifier
- Trigger: Unknown (error reported by user during amplihack testing)
- Impact: Blocks amplifier execution when pygments lexer is needed
Expected Behavior
Pygments should be properly installed with all required submodules including pygments.lexers.data.
Verification
Local testing shows the module EXISTS in both environments:
# Local Python
$ python3 -c "import pygments.lexers.data; print(pygments.lexers.data.__file__)"
/home/azureuser/.cache/uv/.../pygments/lexers/data.py
# Amplifier UV Tool Environment
$ /home/azureuser/.local/share/uv/tools/amplifier/bin/python3 -c "import pygments.lexers.data"
/home/azureuser/.local/share/uv/tools/amplifier/lib/python3.12/site-packages/pygments/lexers/data.pyModule exists but error still reported.
Possible Causes
- Incomplete pygments installation: Some pygments subpackages missing in certain conditions
- Import order issue: Module imported before pygments fully initialized
- Version mismatch: Incompatible pygments version
- Platform-specific issue: Error only on certain Python versions or platforms
Reproduction
Unable to reproduce consistently. Error occurred during recipe execution but exact trigger unknown.
Recommended Investigation
- Add pygments to explicit dependencies with version pin
- Add import verification test in CI
- Check which amplifier component imports pygments.lexers.data
- Verify pygments installation completeness in uv tool environment
Impact
- Severity: MEDIUM (blocks execution when triggered)
- Frequency: LOW (inconsistent reproduction)
- Workaround: Reinstall amplifier or pygments
Related
User reported during amplihack recipe testing. May be related to bundle loading or tool initialization.
Metadata
Metadata
Assignees
Labels
No labels