wp231957 发表于 2022-10-31 11:23:46

有人帮忙看看 这些算是错误还是什么鬼 (内详)

D:\>cd wpp

D:\wpp>py
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "D:\Python37\lib\site.py", line 439, in register_readline
    readline.read_history_file(history)
File "D:\Python37\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
    self.mode._history.read_history_file(filename)
File "D:\Python37\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file
    for line in open(filename, 'r'):
UnicodeDecodeError: 'gbk' codec can't decode byte 0x8c in position 384: illegal multibyte sequence
>>>

jackz007 发表于 2022-10-31 11:33:50

      我这里也一样不顺利
D:\\Python>py
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "C:\Python34\lib\site.py", line 396, in register_readline
    import rlcompleter
File "C:\Python34\lib\rlcompleter.py", line 173, in <module>
    readline.set_completer(Completer().complete)
AttributeError: 'module' object has no attribute 'set_completer'
>>>
      这玩意是干什么的?
D:\\Python>which py

      C:\WINDOWS\py.exe

      一共找到了 1 个相关文件

wp231957 发表于 2022-10-31 11:38:45

jackz007 发表于 2022-10-31 11:33
我这里也一样不顺利

      这玩意是干什么的?

D:\wpp>which py
/cygdrive/c/Windows/py

D:\wpp>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "D:\Python37\lib\site.py", line 439, in register_readline
    readline.read_history_file(history)
File "D:\Python37\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
    self.mode._history.read_history_file(filename)
File "D:\Python37\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file
    for line in open(filename, 'r'):
UnicodeDecodeError: 'gbk' codec can't decode byte 0x8c in position 384: illegal multibyte sequence

D:\wpp>which python
/cygdrive/d/Python37/python

jackz007 发表于 2022-10-31 11:44:04

wp231957 发表于 2022-10-31 11:38
D:\wpp>which py
/cygdrive/c/Windows/py



      我想,罪魁祸首十有八九是它要读取的这个文件里面包含中文字符。
self.mode._history.read_history_file(filename)
页: [1]
查看完整版本: 有人帮忙看看 这些算是错误还是什么鬼 (内详)