n8n-io / n8n-docs

Documentation for n8n, a fair-code licensed automation tool with a free community edition and powerful enterprise options. Build AI functionality into your workflows.
https://docs.n8n.io
Other
153 stars 295 forks source link

Lesson 2 exercise error. #1960

Open DaNether opened 6 months ago

DaNether commented 6 months ago

This error is in the code provide and needs to be corrected or better written to reflect the current systems configuration and instruction for learning. See this link

To replicate: Copy and paste code into workflow and test to see the enclosed screen error Problem in node 'Read/Write files from Disk". I believe I know how to correct yet should be updated in your system for training.

Below is the code from training that has error. Screenshot 2024-03-07 at 5 21 13 PM

 {
    "name": "JSON to file and Read-Write",
    "nodes": [
        {
        "parameters": {},
        "id": "78639a25-b69a-4b9c-84e0-69e045bed1a3",
        "name": "When clicking \"Execute Workflow\"",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
            480,
            520
        ]
        },
        {
        "parameters": {
            "url": "https://poetrydb.org/random/1",
            "options": {}
        },
        "id": "a11310df-1287-4e9a-b993-baa6bd4265a6",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.1,
        "position": [
            680,
            520
        ]
        },
        {
        "parameters": {
            "operation": "toJson",
            "options": {}
        },
        "id": "06be18f6-f193-48e2-a8d9-35f4779d8324",
        "name": "Convert to File",
        "type": "n8n-nodes-base.convertToFile",
        "typeVersion": 1,
        "position": [
            880,
            520
        ]
        },
        {
        "parameters": {
            "operation": "write",
            "fileName": "/tmp/poetrydb.json",
            "options": {}
        },
        "id": "f2048e5d-fa8f-4708-b15a-d07de359f2e5",
        "name": "Read/Write Files from Disk",
        "type": "n8n-nodes-base.readWriteFile",
        "typeVersion": 1,
        "position": [
            1080,
            520
        ]
        },
        {
        "parameters": {
            "fileSelector": "={{ $json.fileName }}",
            "options": {}
        },
        "id": "d630906c-09d4-49f4-ba14-416c0f4de1c8",
        "name": "Read/Write Files from Disk1",
        "type": "n8n-nodes-base.readWriteFile",
        "typeVersion": 1,
        "position": [
            1280,
            520
        ]
        }
    ],
    "pinData": {},
    "connections": {
        "When clicking \"Execute Workflow\"": {
        "main": [
            [
            {
                "node": "HTTP Request",
                "type": "main",
                "index": 0
            }
            ]
        ]
        },
        "HTTP Request": {
        "main": [
            [
            {
                "node": "Convert to File",
                "type": "main",
                "index": 0
            }
            ]
        ]
        },
        "Convert to File": {
        "main": [
            [
            {
                "node": "Read/Write Files from Disk",
                "type": "main",
                "index": 0
            }
            ]
        ]
        },
        "Read/Write Files from Disk": {
        "main": [
            [
            {
                "node": "Read/Write Files from Disk1",
                "type": "main",
                "index": 0
            }
            ]
        ]
        }
    }
}
StarfallProjects commented 6 months ago

Thanks for the report.

@bartv42 can you take a look at this?

bartv42 commented 6 months ago

@DaNether I just ran your code both on our cloud and on a self-hosted system and it works as expected. How do you host? And on which operating system?

bartv42 commented 4 months ago

@DaNether Did you see my message above?

DaNether commented 4 weeks ago

We use cloud and do not host.