Hello,
Some rows might have an empty column.
How can I check it's filled with data?
Some rows might have an empty column.
How can I check it's filled with data?
file = open("output.txt", 'at',encoding='utf-8') for row in cur.execute("select id,introtext,fulltext from content"): soup = BeautifulSoup(row["introtext"], 'lxml') file.write(soup.body.text) #Not null? #AttributeError: 'NoneType' object has no attribute 'text' #if row["fulltext"]: if len(row["fulltext"]): soup = BeautifulSoup(row["fulltext"], 'lxml') file.write(soup.body.text) file.close()Thank you.