n8n-nodes-python
n8n-nodes-python copied to clipboard
Getting OOM error while running python node
getting the following error: n8n may have run out of memory while executing it while executing an HTML parsing job.
n8n was assigned 20g ram, so there is no way the execution on this node would run oom. I wonder if there is a memory limit on the node itself. How can I config this limit?
Hello @keajer The error you are experiencing does not seem to be related to this library. For further information, please check out this section "Memory-related errors"
It unlikely its related to the overall ram from n8n. it's likely the node crashed with a wrong error message.
btw, I also got an error with Cannot read properties of undefined (reading 'main') in the main n8n stdout when the python node crashes.
Paste the code below for visibility
from bs4 import BeautifulSoup
for item in items:
if 'body' in item:
body = item['body']
if 'headers' in item:
headers = item['headers']
soup = BeautifulSoup(body)
tb = soup.find('tbody')
del soup
res = [i.find('span', {'class': 'titleline'}).text for i in tb.find_all('tr', {"class": "athing"})]
del tb
return [{'date': headers['date']}, {'res': res}]