Skip to content

fix: install structlog, Pillow, jsonschema in Pyodide Worker#509

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/pyodide-packages
Jun 29, 2026
Merged

fix: install structlog, Pillow, jsonschema in Pyodide Worker#509
dmccoystephenson merged 1 commit into
mainfrom
fix/pyodide-packages

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

These packages are imported at module level during game startup and aren't available in Pyodide by default:

  • structloggameLogging/logger.py imports and configures it at module load time; every other module that calls getLogger() fails if it's missing
  • PIL/PillowworldScreenMapImageUpdaterMapImageGenerator import chain; Pillow is bundled in Pyodide v0.26 so no PyPI fetch needed
  • jsonschema — used by world persistence, codex, inventory; also bundled in Pyodide v0.26

Adds an "Installing Python packages…" status step in the Worker between OPFS mount and game download.

🤖 Generated with Claude Code

These packages are imported at module level during game startup:
- structlog: gameLogging/logger.py (import + configure at module load)
- PIL/Pillow: worldScreen → MapImageUpdater → MapImageGenerator
- jsonschema: world saves, codex, inventory persistence

Pillow and jsonschema are bundled with Pyodide v0.26; structlog is
a pure-Python PyPI package installed via micropip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dmccoystephenson dmccoystephenson merged commit 63f91d2 into main Jun 29, 2026
4 checks passed
@dmccoystephenson dmccoystephenson deleted the fix/pyodide-packages branch June 29, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant