microsoft / microsoft/amplifier
ModuleNotFoundError: No module named 'pygments.lexers.data'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
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.py
Module 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by identifying which amplifier component imports pygments.lexers.data during recipe execution, then reproduce the failure in the uv tool environment. Compare dependency installation and Pygments versions across the environments described in the issue. Done means the trigger is identified, the installation or import problem is fixed, and an import verification test covers it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100