错误是这样的:
Traceback (most recent call last):
File "E:\General\Coding\SCS2\SCS2.py", line 146, in <module>
StartMenu()
File "E:\General\Coding\SCS2\SCS2.py", line 62, in StartMenu
StartMenu()
File "E:\General\Coding\SCS2\SCS2.py", line 99, in StartMenu
MessageDecrypt = file.read()
File "C:\Program Files (x86)\Python35-32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 8: character maps to <undefined>
尝试在脚本上运行解码功能时出现此错误。但是,编码消息可以正常工作。 解码将消息转换为它的ASCII值,然后使用我输入的键将它们移回原始值。然后,它使用chr()将值转换回字符。我知道这部分工作是因为我运行了类似的脚本而没有任何问题。 请帮忙!