On 2021-08-06 16:50, Suretha Weweje wrote:
I am trying to upload a CSV file with flask, read and process one line at a
time while iterating through all rows of the file and write the results
back to a new CSV file.  My python script produces the correct results on
its own, but I am not able to get the same results when using Flask. I am
new to flask.

[snip]
>
     csv_reader = csv.reader(new)

[snip]

     *mywriter = csv.DictWriter('results.csv', fieldnames=headers_new)*
[snip]

The problem has nothing to do with Flask.

'csv.reader' and 'csv.DictWriter' expect a file object, but you're passing them strings.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to