Return PythonShell output to a http response

Are you running the browser on a different computer to node-red? If different can you ping the node-red computer from the one running the browser?

I'm running NR on the same computer and opening it on Chrome on the same PC. I've tried completely uninstalling and re-installing it but still stuck.

28 Mar 16:48:33 - [info] Settings file : /root/.node-red/settings.js
28 Mar 16:48:33 - [info] Context store : 'default' [module=memory]
28 Mar 16:48:33 - [info] User directory : /root/.node-red
28 Mar 16:48:33 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 Mar 16:48:33 - [info] Flows file : /root/.node-red/flows_DESKTOP-O493CRT.json
28 Mar 16:48:33 - [info] Creating new flow file
28 Mar 16:48:33 - [warn]

What OS are you running?
Is there a reason you are running as root? Note that it is creating a new flows file, which suggests that you were not running as root previously, or that the hostname has changed (DESKTOP-O493CRT).
What did you do that made it stop working?
Show us the full node-red startup log and tell us what you are putting in the browser as the url.

Os- Windows

Running on WSL2

I was going through that pythonshell issue. Then I tried to open node-red and this came up. So I uninstalled NR completely along with it's directory and then re-installed it.

I think I'm facing a really bad day.

I suspect you may have installed (or are running it) in a different way to originally.

Can you elaborate?

No, I don't know how you originally installed and ran it and I don't know how you are doing it now, but it isn't finding the flows file so either it is looking for the wrong file or looking in the wrong folder. That doesn't explain why the browser isn't connecting though.

Perhaps it is a WSL issue, I don't know how that works. Can there be multiple virtual WSL machines? If so perhaps you are in the wrong one. Get someone where you are to help you get out of the mess.