为什么我总是遇到vscode中的“ TypeError:'object'对象的描述符'__dir__'需要一个参数”

时间:2018-10-21 07:43:31

标签: python-3.x debugging visual-studio-code

当我使用vscode进行调试时,我总是遇到错误消息。自从我更新到最新版本的vscode(1.28.2)以来,出现此消息。 日志是: Error evaluating: thread_id: pid_30992_id_140014207786064 frame_id: 94438457210488 scope: EXPRESSION attrs: torch Traceback (most recent call last): File "/miniconda2/envs/py37/lib/python3.7/site-packages/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 253, in resolve_compound_variable_fields return _typeName, resolver.get_dictionary(var) File "/miniconda2/envs/py37/lib/python3.7/site-packages/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 75, in get_dictionary return self._getPyDictionary(var, names) File "/miniconda2/envs/py37/lib/python3.7/site-packages/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 148, in _getPyDictionary names = self.get_names(var) File "/miniconda2/envs/py37/lib/python3.7/site-packages/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 136, in get_names names = dir(var) TypeError: descriptor '__dir__' of 'object' object needs an argument 解决这个问题的任何想法。

0 个答案:

没有答案