【发布时间】:2018-01-02 17:13:38
【问题描述】:
使用 PyCharm 进行调试(发生在多个版本上)我无法正确查看某些列表和字典(其他显示正确)。
在视图窗口中,对象的名称与消息一起显示:
{list} Unable to get repr for <type 'list>
要么
{dict} Unable to get repr for <type 'dict'>
更新: 在我的一次尝试中,我收到了来自调试器的以下消息(而不是列表变量之一的值):
无法显示子项:解析变量 Traceback 时出错(大多数 最近通话最后):文件“/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py”,行 1004,在do_it中 _typeName, valDict = pydevd_vars.resolve_compound_variable(self.thread_id, self.frame_id, self.scope, self.attributes) TypeError: 'NoneType' 对象不是 可迭代
我会很感激任何关于什么可能导致这种行为的想法?
谢谢!
【问题讨论】:
-
请添加一个最小的工作示例
-
小样本或任何脚本都不会重现该问题。我试图了解可能导致此类错误的潜在原因。谢谢!