I am writing a simple project in python. My version of python is: 3.13.1 . I am using IntelliJ and Python plugin with version: 241.18034.62. I would like to debug my project but when I try to debug I am getting many errors:
AttributeError: '_MainThread' object has no attribute 'isAlive'. Did you mean: 'is_alive'?
bigger part of stacktrace:
C:\projects\mat\venv\Scripts\python.exe -X pycache_prefix=C:\Users\mylogin\AppData\Local\JetBrains\IntelliJIdea2024.1\cpython-cache C:/Users/mylogin/AppData/Roaming/JetBrains/IntelliJIdea2024.1/plugins/python/helpers/pydev/pydevd.py --multiprocess --qt-support=pyqt5 --client 127.0.0.1 --port 4095 --file C:\projects\mat\org\aa\aa\mat\delivery_processor.py
Connected to pydev debugger (build 241.18034.62)
Traceback (most recent call last):
File "C:\Users\mylogin\AppData\Roaming\JetBrains\IntelliJIdea2024.1\plugins\python\helpers\pydev\_pydevd_bundle\pydevd_pep_669_tracing.py", line 238, in py_start_callback
if not is_thread_alive(thread):
~~~~~~~~~~~~~~~^^^^^^^^
File "C:\Users\mylogin\AppData\Roaming\JetBrains\IntelliJIdea2024.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_is_thread_alive.py", line 18, in is_thread_alive
return t.isAlive()
^^^^^^^^^
AttributeError: 'WriterThread' object has no attribute 'isAlive'. Did you mean: 'is_alive'?
From what I have understood there is some mismatch with versions. I have tried to change the dbugger properties:
But none if these helped. How should I setup my IntelliJ environment to be able to debug? I would like to avoid downgrading python version.
Path in error message may suggest that it is mistake in plugin, not in your code.
It looks like code for Python2
which has function isAlive()
.
At this moment you may try to fix it.
Open
C:\Users\mylogin\AppData\Roaming\JetBrains\IntelliJIdea2024.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_is_thread_alive.py
and change isAlive
into is_alive
and it may help in this place.
But if it was created for Python 2 then it may have more problems in other places.
You could send this problem it author(s) of this plugin.