Trying to read headers for a csv file with:
reader = csv.DictReader(open(PATH_FILE),skipinitialspace=True)
headers = reader.fieldnames
for header in sorted(set(headers)):
It worked on development server, throws this error on production
'NoneType' object is not iterable
Debug shows headers has None value while the csv file has headers in it.
headers:None