Leo Skhrnkv
Leo Skhrnkv

Reputation: 1703

Pycharm debugger(version 2022.2.3) stops with DeprecationWarning

I know it was noted here: Python 3.10 warning but... I am using Pycharm version 2022.2.3 (most recent) and still cannot run debugger. I still get

Traceback (most recent call last):
...
    output_checker_thread = self.output_checker_thread = CheckOutputThread(self)
  File "/snap/pycharm-community/302/plugins/python-ce/helpers/pydev/pydevd.py", line 166, in __init__
    self.setName('pydevd.CheckAliveThread')
  File "/usr/lib/python3.10/threading.py", line 1246, in setName
    warnings.warn('setName() is deprecated, set the name attribute instead',
DeprecationWarning: setName() is deprecated, set the name attribute instead

I work on Ubuntu 22.04. Pycharm is 2022.2.3 (community edition). It's been a month since I moved to Python 3.10 and I can't use my IDE debugger! maybe I should manually change how the debugger is run? Like turn off warnings, maybe? I can't find where and how I can do it though...

Upvotes: 2

Views: 697

Answers (1)

Pavel Karateev
Pavel Karateev

Reputation: 8515

I created a ticket in PyCharm's bug tracker for this problem https://youtrack.jetbrains.com/issue/PY-56773/helperspydevpydevdpy166-DeprecationWarning-setName-is-deprecated

A dirty quick workaround is to edit /snap/pycharm-community/302/plugins/python-ce/helpers/pydev/pydevd.py line 166 converting

self.setName('pydevd.CheckAliveThread')

to

self.name = 'pydevd.CheckAliveThread'

Upvotes: 1

Related Questions