[Fixed]-Django, reading csv from form request throws: Error: line contains NULL byte

1👍

You may want to take a look at this answer "Line contains NULL byte" in CSV reader (Python)

which utilizes the codecs library:

import codecs
csvReader = csv.reader(codecs.open('file.csv', 'rU', 'utf-16'))

to open the file with different encodings (ex: utf-16)

Good luck 🙂

Leave a comment