# Corrupted node-red hangs immediately - added 'python' node seems to be to blame

**URL:** <https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444>\
**Category:** General\
**Tags:** editor\
**Created:** [18 October 2025 14:44 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444 "2025-10-18T14:44:09Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 14:44 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/1 "2025-10-18T14:44:09Z")

</div>

I started a new flow to automate adding my solar panel data to a MariaDB.

I added three nodes to the palette

1. crontab
2. rsync
3. python3

intention was to trigger rsync every day after sundown (around 23:00) to sync my inverter's USB storage, which collects each day's .csv file with a folder on my desktop, where I've collected all these files, since 2012. Previously, I've manually run LuckyBackup occasionally.

Half an hour later I was planning to run a python script on my desktop (via ssh) that parses the non-trivial .csv file(s) to insert the power & full timestamp to a desktop bases DB.

I hadn't decided whether I'd execute the python script directly on my desktop or run it on the Pi and just update the DB on my desktop. I installed a python3 node in the palette and dragged an instance into a flow, so I could take a look at its capability. Node-red stopped working and

```auto
root@DietPi:/# systemctl status node-red
● node-red.service - Node-RED (DietPi)
     Loaded: loaded (/etc/systemd/system/node-red.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/node-red.service.d
             └─dietpi-services_edit.conf
     Active: failed (Result: exit-code) since Sat 2025-10-18 15:22:29 BST; 7min ago
    Process: 31673 ExecStart=/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red -u />
   Main PID: 31673 (code=exited, status=1/FAILURE)
        CPU: 7.017s

Oct 18 15:22:29 DietPi node-red[31673]: 18 Oct 15:22:29 - [error] [mqtt out:8e45101283d9fa>
Oct 18 15:22:29 DietPi node-red[31673]: 18 Oct 15:22:29 - [info] Started flows
Oct 18 15:22:29 DietPi node-red[31673]: [red] Uncaught Exception:
Oct 18 15:22:29 DietPi node-red[31673]: 18 Oct 15:22:29 - [error] Error: spawn python ENOE>
Oct 18 15:22:29 DietPi node-red[31673]: at ChildProcess._handle.onexit (node:internal/>
Oct 18 15:22:29 DietPi node-red[31673]: at onErrorNT (node:internal/child_process:484:>
Oct 18 15:22:29 DietPi node-red[31673]: at process.processTicksAndRejections (node:int>
Oct 18 15:22:29 DietPi systemd[1]: node-red.service: Main process exited, code=exited, sta>
Oct 18 15:22:29 DietPi systemd[1]: node-red.service: Failed with result 'exit-code'.
Oct 18 15:22:29 DietPi systemd[1]: node-red.service: Consumed 7.017s CPU time.

```

Which contains `Error: spawn python ENOE>` which leads me to believe this node caused the problem.

I don't know where/how to expunge this node instance and palette entry via `ssh` (editor & dashboard don't work)

suggestions please?

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 14:46 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/2 "2025-10-18T14:46:30Z")

</div>

As you can see, I run node-red on DietPi, as a service (`systemctl start node-red`)

I tried to work out how to set environment variables to start in 'safe mode' but description wasn't very good and I failed to do that

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 14:49 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/3 "2025-10-18T14:49:58Z")

</div>

> [@Noh](#):
>
> I added three nodes to the palette
> 
> 1. crontab
> 2. rsync
> 3. python3

Also, please proved the exact/full names and a link to them in [the library](https://flows.nodered.org/)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/2/c24a1d00338db47b57ddab095a249bc4bd1490bd.png)

> [@Noh](#):
>
> Half an hour later I was planning to run a python script on my desktop (via ssh) that parses the non-trivial .csv file(s) to insert the power & full timestamp to a desktop bases DB

Why cant you do this in Node-RED (without any need for python)? Tis quite simple to do!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 14:56 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/4 "2025-10-18T14:56:03Z")

</div>

> [@Noh](#):
>
> I don't know where/how to expunge this node instance and palette entry via `ssh` (editor & dashboard don't work)

You can start node-red in safe mode and use the palette manger to remove it

```bash
node-red --safe

```

or in a terminal, enter

```bash
cd path-to-node-red-user-dir-as-printed-in-start-of-log--usually.node-red
npm remove full-name-of-bad-node

```

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 14:56 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/5 "2025-10-18T14:56:34Z")

</div>

If only I could start the editor to see the installed nodes (and their full names)? Alas, I can't and

```auto
root@DietPi:/# node-red-admin list
AggregateError

```

So, sorry not sure how?

Reason for python is that I already have a moderately complex python script that parses the file header to extract date and concatenate it with each line's time-stamp to create a full timestamp and has all the DB login working amongst other features, so I just wanted to not rewrite in another language, given that it just works.

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 14:57 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/6 "2025-10-18T14:57:46Z")

</div>

I'll try that now

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 14:58 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/7 "2025-10-18T14:58:22Z")

</div>

> [@Noh](#):
>
> If only I could start the editor to see the installed nodes (and their full names)? Alas, I can't and

You can see the names of installed nodes in the `package.json` file in the node-red user directory (usually `~/.node-red`)

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:05 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/8 "2025-10-18T15:05:21Z")

</div>

As it's DietPi, it's installed from a constrained DietPi repo, as root user.

Any thoughts about which `node-red` folder I should be looking in?

```auto
root@DietPi:/# find / -name node-red -print
/root/node_modules/.bin/node-red
/root/node_modules/node-red
/root/node_modules/@node-red/editor-client/public/types/node-red
/mnt/dietpi_userdata/node-red
/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red
/mnt/dietpi_userdata/node-red/node_modules/node-red
/mnt/dietpi_userdata/node-red/node_modules/@node-red/editor-client/public/types/node-red
/mnt/dietpi-backup/data/root/node_modules/.bin/node-red
/mnt/dietpi-backup/data/root/node_modules/node-red
/mnt/dietpi-backup/data/root/node_modules/@node-red/editor-client/public/types/node-red
/mnt/dietpi-backup/data/mnt/dietpi_userdata/node-red
/mnt/dietpi-backup/data/mnt/dietpi_userdata/node-red/node_modules/bcrypt/build-tmp-napi-v3/Release/.deps/mnt/dietpi_userdata/node-red
/mnt/dietpi-backup/data/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red
/mnt/dietpi-backup/data/mnt/dietpi_userdata/node-red/node_modules/node-red
/mnt/dietpi-backup/data/mnt/dietpi_userdata/node-red/node_modules/@node-red/editor-client/public/types/node-red

```

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:07 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/9 "2025-10-18T15:07:48Z")

</div>

> [@Noh](#):
>
> `/root/node_modules/node-red`

I should have looked before asking you. Second entry seems to fit the bill

```auto
root@DietPi:~/node_modules/node-red# ll
total 124K
-rw-r--r-- 1 root root 11K Feb 10 2024 LICENSE
drwxr-xr-x 2 root root 4.0K Feb 10 2024 bin
drwxr-xr-x 2 root root 4.0K Feb 10 2024 lib
-rwxr-xr-x 1 root root 21K Feb 10 2024 red.js
-rw-r--r-- 1 root root 1.2K Feb 10 2024 package.json
-rw-r--r-- 1 root root 32K Feb 10 2024 CHANGELOG.md
-rw-r--r-- 1 root root 1.6K Feb 10 2024 README.md
drwxr-xr-x 259 root root 12K Feb 12 2024 ..
-rw-r--r-- 1 root root 23K Jun 18 05:45 settings.js
drwxr-xr-x 4 root root 4.0K Jun 18 05:45 .

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 15:12 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/10 "2025-10-18T15:12:00Z")

</div>

> [@Noh](#):
>
> ```auto
> root@DietPi:~/node_modules/node-red# ll
> 
> ```

that is likely to be the node-red source.

what is in `/mnt/dietpi_userdata/node-red`?

PS, running as root is not a good idea and strongly discouraged!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 15:14 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/11 "2025-10-18T15:14:59Z")

</div>

How did you install node-red?  
what do you see if you simply start node red from command line `node-red`?

The start up log of node-red reveals (definitively) where the user-dir is

e.g..

```bash
$ node-red

    Welcome to Node-RED
    ===================

    18 Oct 14:11:22 - [info] Node-RED version: v4.1.1
    18 Oct 14:11:22 - [info] Node.js version: v20.19.1
    18 Oct 14:11:22 - [info] Windows_NT 10.0.26100 x64 LE
    18 Oct 14:11:22 - [info] Loading palette nodes
    18 Oct 14:11:25 - [info] FlowFuse Light Theme Plugin loaded
    18 Oct 14:11:25 - [info] FlowFuse Dark Theme Plugin loaded
    18 Oct 14:11:31 - [info] Dashboard version 3.6.6 started at /ui
    18 Oct 14:11:31 - [info] FlowFuse AI Nodes: Using model cache directory: C:\Users\user1\repos\node-red\model_cache
    18 Oct 14:11:32 - [info] Settings file : C:\Users\user1\.node-red\settings.js
    18 Oct 14:11:32 - [info] HTTP Static : c:\temp > /
    18 Oct 14:11:32 - [info] Context store : 'default' [module=memory]
    18 Oct 14:11:32 - [info] User directory : \Users\user1\.node-red <<<<--------------- HERE
    18 Oct 14:11:32 - [warn] Projects disabled : editorTheme.projects.enabled=false
    18 Oct 14:11:32 - [info] Flows file : \Users\user1\.node-red\blueprint-rag.json
    18 Oct 14:11:32 - [info] Server now running at http://127.0.0.1:1880/

```

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:17 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/12 "2025-10-18T15:17:58Z")

</div>

I have to `cd /root/node_modules/.bin/` and `./node-red --safe`, which returns

```auto
(node:37945) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/root/node_modules/node-red/red.js:500
        util.log('[red] Uncaught Exception:');
             ^

TypeError: util.log is not a function
    at process.<anonymous> (/root/node_modules/node-red/red.js:500:14)
    at process.emit (node:events:508:28)
    at process._fatalException (node:internal/process/execution:159:25)
    at throwUnhandledRejectionsMode (node:internal/process/promises:394:5)
    at processPromiseRejections (node:internal/process/promises:475:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:106:32)

Node.js v24.8.0

```

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:36 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/13 "2025-10-18T15:36:45Z")

</div>

```auto
root@DietPi:/mnt/dietpi_userdata/node-red# ll
total 708K
drwxrwxr-x 12 dietpi dietpi 4.0K Sep 15 20:40 ..
-rw-r--r-- 1 nodered nodered 26K Sep 15 20:41 settings.js
drwxr-xr-x 3 nodered nodered 4.0K Sep 15 20:41 lib
-rw-r--r-- 1 nodered nodered 133 Sep 15 20:44 .config.runtime.json.backup
-rw-r--r-- 1 nodered nodered 163 Sep 15 20:44 .config.runtime.json
drwxr-xr-x 4 nodered nodered 4.0K Sep 15 20:46 .npm
drwxr-xr-x 3 nodered nodered 4.0K Sep 15 20:47 .cache
-rw-r--r-- 1 nodered nodered 51 Sep 15 20:48 flows_cred.json
drwxr-xr-x 2 nodered nodered 4.0K Sep 16 19:05 cronplusdata
-rw-r--r-- 1 nodered nodered 748 Sep 18 17:35 .config.users.json.backup
-rw-r--r-- 1 nodered nodered 747 Sep 18 17:35 .config.users.json
drwxr-xr-x 454 nodered nodered 20K Oct 18 10:06 node_modules
-rw-r--r-- 1 nodered nodered 506 Oct 18 10:06 package.json
-rw-r--r-- 1 nodered nodered 239K Oct 18 10:07 package-lock.json
-rw-r--r-- 1 nodered nodered 130K Oct 18 10:16 .flows.json.backup
-rw-r--r-- 1 nodered nodered 132K Oct 18 10:16 flows.json
-rw-r--r-- 1 nodered nodered 51K Oct 18 11:00 .config.nodes.json.backup
-rw-r--r-- 1 nodered nodered 51K Oct 18 11:00 .config.nodes.json
drwxr-xr-x 8 nodered nodered 4.0K Oct 18 15:20 .
drwxr-xr-x 2 nodered nodered 4.0K Oct 18 15:23 .node-red

```

looks like a hit?  
I won't touch anything until I hear from you...

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2025 15:41 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/14 "2025-10-18T15:41:02Z")

</div>

> [@Noh](#):
>
> looks like a hit

Yes.

Now you can list packages by `cat package.json` and see what dependencies are in there.

Once you get the full name of the python node, use `npm remove xxxxx`

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:49 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/15 "2025-10-18T15:49:23Z")

</div>

> [@Steve-Mcl](#):
>
> `cat package.json`

```auto
root@DietPi:/mnt/dietpi_userdata/node-red# cat package.json
{
  "dependencies": {
    "@flowfuse/node-red-dashboard": "~1.29.0",
    "@mitch.capper/node-red-contrib-countdown-mc": "~2.0.1",
    "node-red": "^4.1.0",
    "node-red-contrib-cron-plus": "~2.2.4",
    "node-red-contrib-light": "~1.0.0",
    "node-red-contrib-python3-function": "~0.0.4",
    "node-red-contrib-rsync": "~1.1.1",
    "node-red-contrib-ui-iro-color-picker": "~0.1.6",
    "node-red-node-mysql": "~2.0.0",
    "node-red-node-ui-table": "~0.4.5",
    "node-red-node-watson": "~0.10.3"
  }
}

```

---

<div class="post-metadata">

**Author:** ![Noh](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@Noh](https://discourse.nodered.org/u/Noh)\
**Post date:** [18 October 2025 15:53 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/16 "2025-10-18T15:53:58Z")

</div>

Thanks for your perserverance @Steve-Mcl . Got there in the end 😇

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 October 2025 09:02 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/17 "2025-10-19T09:02:43Z")

</div>

If you need to run a python script from node red I think the best way is to use an Exec node to run it. Make sure you specify the full path to the python interpreter and to the script file.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 November 2025 09:02 UTC](https://discourse.nodered.org/t/corrupted-node-red-hangs-immediately-added-python-node-seems-to-be-to-blame/99444/18 "2025-11-02T09:02:54Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
