Update csv_reader.py

Possible fix for 'charmap' codec can't decode
This commit is contained in:
AIrjen
2023-04-15 18:43:08 +02:00
parent f599b73197
commit c4437019f7
+1 -1
View File
@@ -22,7 +22,7 @@ def csv_to_list(csvfilename):
csvlist = []
script_dir = os.path.dirname(os.path.abspath(__file__))
full_path = os.path.join(script_dir, ".\\csvfiles\\" )
with open(full_path + csvfilename + ".csv", "r", newline="") as file:
with open(full_path + csvfilename + ".csv", "r", newline="",encoding="utf8") as file:
reader = csv.reader(file, delimiter=",")
for row in reader:
csvlist.append(row[0])