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

前端 未结 9 1526
情歌与酒
情歌与酒 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 01:05

    Alternatively if you don't need to decode the file, such as uploading the file to a website, open(filename, 'rb')

    where r = reading, b = binary

提交回复
热议问题