UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 7240: character maps to

前端 未结 3 1072
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-10 16:57

I am student doing my master thesis. As part of my thesis, I am working with python. I am reading a log file of .csv format and writing the ext

3条回答
  •  庸人自扰
    2020-12-10 17:45

    I have solved this issue by simply adding a parameter in open()

    with open(filename, encoding = 'cp850') as csv_file:
        csv_reader = csv.reader(csv_file, delimiter=',')
    

提交回复
热议问题