ERROR MESSAGE
UnicodeDecodeError
: 'cp949' codec can't decode byte 0xec in position 457: illegal multibyte sequence
csv file open시 encoding 문제임.
encoding="utf-8" 을 추가함
# 변경전
import csv
with open('LIST.csv', newline='') as f:
reader = csv.reader(f)
data = list(reader)
print(data)
#변경후
import csv
with open('LIST.csv', newline='',encoding="utf-8") as f:
reader = csv.reader(f)
data = list(reader)
print(data)
ERROR
_
반응형