I am trying to open some file and I know there are some errors in the file with UTF-8 encoding, so what I will do in python3 is
open(fileName, 'r', errors = 'ignore')
but now I need to use python2, what are the corresponding way to do this?
Below is my code after changing to codecs
with codecs.open('data/journalName1.csv', 'rU', errors="ignore") as file:
reader = csv.reader(file)
for line in reader:
print(line)
And file is here https://www.dropbox.com/s/9qj9v5mtd4ah8nm/journalName.csv?dl=0