当我使用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
解决这个问题的任何想法。