我试图读取csv文件并继续收到以下错误。有人能指出我正确的方向来解决这个错误吗?
import csv
with open('apple.csv') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
print("1")
这是输出:
Traceback (most recent call last):
File "/Users/arch/Desktop/ark/ark.py", line 4, in <module>
for row in reader:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 263: ordinal not in range(128)