UnicodeDecodeError: 'charmap' codec can't decode byte X in position Y: character maps to

前端 未结 9 1552
情歌与酒
情歌与酒 2020-11-22 00:43

I\'m trying to get a Python 3 program to do some manipulations with a text file filled with information. However, when trying to read the file I get the following error:

9条回答
  •  自闭症患者
    2020-11-22 00:55

    Just to add in case file = open(filename, encoding="utf8") does not work try file = open(filename, errors='ignore')

提交回复
热议问题