I'm struggling to break the following error down: "AttributeError: 'builtin_function_or_method' object has no attribute 'fieldnames'"
I'm using the following code, which DOES work on Windows, unlike Linux... which is an issue, because I have to get this working on an AWS server enrolled with Linux.
import csv
from csv import reader
with open('/home/maurits/PolisCheck/check/PolisLists/PolisCheck.csv', newline='') as csvfile:
PolisCheck = csv.DictReader(csvfile)
for row in PolisCheck:
([col + '=' + row[col] for col in reader.fieldnames])
Thanks in advance!