pydev调试器启动失败,但代码运行正常

时间:2019-05-23 18:45:57

标签: pydev liclipse

当我使用LiClipse(两者的最新版本)启动pydev调试器时,出现“ KeyError:”异常。

我确保工作空间文件夹具有适当的权限。即使我在管理员模式下运行LiClipse,也会遇到此问题。

我希望能够调试我的python代码。我的实际结果是以下错误:

pydev debugger: starting (pid: 15388)
Traceback (most recent call last):
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\pydevd_file_utils.py", line 487, in _original_file_to_client
    return cache[filename]
KeyError: 'c:\\users\\xyz\\my documents\\liclipse workspace\\xyzjirabot\\xyzjirabot.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\_pydevd_bundle\pydevd_net_command_factory_xml.py", line 197, in make_thread_stack_str
    py_db, curr_frame, frame_id_to_lineno
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\_pydevd_bundle\pydevd_net_command_factory_xml.py", line 170, in _iter_visible_frames_info
    filename_in_utf8 = pydevd_file_utils.norm_file_to_client(abs_path_real_path_and_base[0])
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\pydevd_file_utils.py", line 489, in _original_file_to_client
    translated = _path_to_expected_str(get_path_with_real_case(_AbsFile(filename)))
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\pydevd_file_utils.py", line 196, in _get_path_with_real_case
    return _resolve_listing(drive, iter(parts))
  File "C:\Program Files\Brainwy\LiClipse 5.2.4\plugins\org.python.pydev.core_7.2.1.201904261609\pysrc\pydevd_file_utils.py", line 159, in _resolve_listing
    dir_contents = cache[resolved_lower] = os.listdir(resolved)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\xyz\\My Documents'

3 个答案:

答案 0 :(得分:0)

当我发布此问题时,我注意到文件名用作键和实际文件路径存在大小写差异。我将工作空间移到了C驱动器的根目录,这似乎已经解决了问题。

答案 1 :(得分:0)

我认为这是文件名中的空格。我将其移至\ Users \ kieveli \ Source \ LiClipseWorkspace \,一切正常。

答案 2 :(得分:0)

发生相同的问题-路径设置为“ .. \我的文档”,而不仅仅是“ .. \ Documents”。将工作空间更改为另一个目录解决了该问题