调试器无法与 pycharm PyCharm 2019.2(社区版)一起使用

调试器无法与 pycharm PyCharm 2019.2(社区版)一起使用

我正在使用 PyCharm 2019.2(社区版)。最初,在更新之前,调试器运行良好,但一旦更新到 2019.2(社区版),每次我打开 Django 应用程序的调试器时,它都会出现

  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 97, in run
    autoreload.main(self.inner_run, None, options)
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/site-packages/django/utils/autoreload.py", line 323, in main
    reloader(wrapped_main_func, args, kwargs)
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/site-packages/django/utils/autoreload.py", line 294, in python_reloader
    exit_code = restart_with_reloader()
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/site-packages/django/utils/autoreload.py", line 280, in restart_with_reloader
    exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)
  File "/snap/pycharm-community/143/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 496, in new_spawnve
    return getattr(os, original_name)(mode, path, args, env)
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/os.py", line 573, in spawnve
    return _spawnvef(mode, file, args, env, execve)
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/os.py", line 549, in _spawnvef
    elif WIFSIGNALED(sts):
  File "/home/ujjwal.sharan/environments/ondemand/lib/python2.7/os.py", line 549, in _spawnvef
    elif WIFSIGNALED(sts):
TypeError: 'NoneType' object is not callable

答案1

我相信这是已知的 PyCharm问题。他们建议在调试配置下选中“不重新加载”。

答案2

我遇到了类似的问题版本 2021.2 社区版,除了降级到 2021.1.3 之外没有其他解决方案

而且我使用之前的版本没有遇到什么问题,因为我已经使用它一段时间了。如果您没有找到任何可用的修复程序,请尝试降级到之前的版本,或者从当前升级到下一个后续版本(如果可用)

相关内容