AttributeError: module 'readline' has no attribute 'set_completer_delims'
AttributeError: module 'readline' has no attribute 'set_completer_delims'
>>> import pdb
>>> x = [1,2,3,4,5]
>>> y = 6
>>> z = 7
>>> r1 = y+z
>>> r1
13
>>> r2 = x+y
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "int") to list
>>> pdb.set_trace()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/pdb.py", line 1585, in set_trace
Pdb().set_trace(sys._getframe().f_back)
File "/usr/lib/python3.6/pdb.py", line 156, in __init__
readline.set_completer_delims(' \t\n`@#$%^&*()=+[{]}\|;:\'",<>?')
AttributeError: module 'readline' has no attribute 'set_completer_delims'
>>>
有什么问题吗? 运行 python3.6 发生错误
我只是尝试在 Cygwin 上进行 pdb。
(注意其他lib也可以)
在我的例子中,问题是通过安装 pyreadline 解决的:
pip install pyreadline
请尝试一下。
>>> import pdb
>>> x = [1,2,3,4,5]
>>> y = 6
>>> z = 7
>>> r1 = y+z
>>> r1
13
>>> r2 = x+y
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "int") to list
>>> pdb.set_trace()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/pdb.py", line 1585, in set_trace
Pdb().set_trace(sys._getframe().f_back)
File "/usr/lib/python3.6/pdb.py", line 156, in __init__
readline.set_completer_delims(' \t\n`@#$%^&*()=+[{]}\|;:\'",<>?')
AttributeError: module 'readline' has no attribute 'set_completer_delims'
>>>
有什么问题吗? 运行 python3.6 发生错误 我只是尝试在 Cygwin 上进行 pdb。 (注意其他lib也可以)
在我的例子中,问题是通过安装 pyreadline 解决的:
pip install pyreadline
请尝试一下。