Skip to content

Fixed Python transforms failing to import requests - #297

Merged
ikraamg merged 1 commit into
mainfrom
python-transforms-get-requests
Oct 17, 2026
Merged

ikraamg merged 1 commit into
mainfrom
python-transforms-get-requests

Conversation

@ikraamg

@ikraamg ikraamg commented Oct 17, 2026

Copy link
Copy Markdown
Contributor
  • TRMNL's serverless Python has requests installed, and most Python transforms fetch with it. A Python on the PATH without it failed with "No module named 'requests'", so trmnlp test drew the error screen.
  • trmnlp now makes a virtual environment with requests in ~/.cache/trmnl/python the first time it needs one and runs Python transforms there. If that fails, for example offline, the Python on the PATH runs as before.
  • The Docker image installs python3-requests, so it never needs the network for it.

🤖 Generated with Claude Code

TRMNL's serverless Python has requests installed, and most Python
transforms fetch with it. A Python on the PATH without it failed with
"No module named 'requests'", so trmnlp test drew the error screen and
the recipe review recorded no responses to mock.

trmnlp now makes a virtual environment with requests in the cache the
first time it needs one and runs Python transforms there. If that
fails, as offline, the Python on the PATH runs as before. The Docker
image installs python3-requests, so it never needs the network for it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ikraamg
ikraamg force-pushed the python-transforms-get-requests branch from 0a2bd69 to aaebc48 Compare October 17, 2026 09:46
@ikraamg
ikraamg merged commit 61f0030 into main Oct 17, 2026
3 checks passed
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