-
Notifications
You must be signed in to change notification settings - Fork 50.6k
Open
Labels
triage:pendingWaiting to be triagedWaiting to be triaged
Description
Bug Description
The Python task runner replaces sys.stderr with io.StringIO() to capture error output. However, StringIO does not implement a working fileno() method, which causes failures when executing code that uses external libraries (like Prisma, psycopg2, or other database drivers) that attempt to call sys.stderr.fileno().
Environment
- n8n Version: 1.117.3
- Deployment: Self-hosted (Docker with Native Python Runners)
- Python Runner: External task runner mode (
n8nio/runners:1.117.3)
To Reproduce
- Enable Native Python Runners with external task runner
- Install Prisma Python client in the runner container:
pip install prisma
- Run this code in an n8n Python Code node:
from prisma import Prisma db = Prisma() db.connect() settings = db.setting.find_many() db.disconnect() return {'count': len(settings)}
Expected behavior
The code should execute successfully and return results from the database query.
Debug Info
Debug info
core
- n8nVersion: 1.117.3
- platform: docker (self-hosted)
- nodeJsVersion: 22.18.0
- nodeEnv: production
- database: postgres
- executionMode: regular
- concurrency: -1
- license: enterprise (production)
- consumerId: 7527b28f-d26b-4db7-8d5b-2dc34312a99a
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: memory
pruning
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
client
- userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/141.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2025-10-29T06:02:07.808Z
Operating System
Docker
n8n Version
1.117.3
Node.js Version
22.18.0
Database
PostgreSQL
Execution mode
main (default)
Hosting
self hosted
Metadata
Metadata
Assignees
Labels
triage:pendingWaiting to be triagedWaiting to be triaged