Jul-26-2019, 08:55 AM
I try to open a CSV file from internet.
Then I try to parse it with CSV lib.
I get error that I deal with it in Binary.
any help?
Then I try to parse it with CSV lib.
I get error that I deal with it in Binary.
any help?
with urllib.request.urlopen(url) as csvfile: reader = csv.DictReader(csvfile) for row in reader: print(row.decode('utf-8'))
Output:_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)