Describe the problem/error/question
The Python (Native) node ion n8n cloud version 2.3.6 can’t import Python standard libraries like these ones:
import email
import json
from io import BytesIO
What is the error message (if any)?
Line 1: Import of standard library module 'email' is disallowed. Allowed stdlib modules: none
Line 2: Import of standard library module 'json' is disallowed. Allowed stdlib modules: none
Line 3: Import of standard library module 'io' is disallowed. Allowed stdlib modules: none
Please share your workflow
Share the output returned by the last node
{
“errorMessage”: “Security violations detected”,
“errorDescription”: “Line 1: Import of standard library module ‘email’ is disallowed. Allowed stdlib modules: none\nLine 2: Import of standard library module ‘json’ is disallowed. Allowed stdlib modules: none\nLine 3: Import of standard library module ‘io’ is disallowed. Allowed stdlib modules: none”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “2.1.5 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“Error: Security violations detected”,
" at throwExecutionError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/Code/throw-execution-error.ts:11:9)“,
" at PythonTaskRunnerSandbox.runUsingIncomingItems (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/Code/PythonTaskRunnerSandbox.ts:57:30)”,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)“,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/Code/Code.node.ts:171:12)”,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2274:11"
]
}
}
Information on your n8n setup
- n8n version: 2.3.6 (Cloud)
- Database (default: SQLite): none
- n8n EXECUTIONS_PROCESS setting (default: own, main): none
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: none
