"-6ren"> "-使用PyCharm进行调试(在多个版本上发生)我无法正确查看某些列表和词典(其他显示正确)。 在 View 窗口中,对象名称随消息一起显示:{list} Unable to get repr for -6ren">
gpt4 book ai didi

macos - PyCharm调试器不显示对象的内容: "Unable to get repr for "

转载 作者:行者123 更新时间:2023-12-03 15:46:30 31 4
gpt4 key购买 nike

使用PyCharm进行调试(在多个版本上发生)我无法正确查看某些列表和词典(其他显示正确)。
在 View 窗口中,对象名称随消息一起显示:{list} Unable to get repr for <type 'list>或者{dict} Unable to get repr for <type 'dict'>
更新:
在我的尝试之一中,我从调试器收到了以下消息(显示出来,而不是列表变量之一的值):

Unable to display children:Error resolving variables Traceback (most recent call last): File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1004, in do_it _typeName, valDict = pydevd_vars.resolve_compound_variable(self.thread_id, self.frame_id, self.scope, self.attributes) TypeError: 'NoneType' object is not iterable



对于可能导致这种行为的原因,我将不胜感激。

谢谢!

最佳答案

事实证明,问题是由于使用了rpyc.py:我正在调试的进程是通过rpyc调用的,而在调试过程中,调用进程在rpyc连接上收到了超时。
我认为这会导致通过rpc传递的变量失去完整性,因此调试器无法正确显示它们。

解决方案是将rpyc.py降级到3.3.0版(我在3.4.2上)。
我的同事Nurit Izraelov正确地建议rpyc.py版本可能是罪魁祸首。

谢谢大家!

关于macos - PyCharm调试器不显示对象的内容: "Unable to get repr for <type ' list>",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45342904/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com