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\\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.
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\\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.
Share Improve this question edited Mar 6 at 10:07 fascynacja asked Mar 6 at 8:28 fascynacjafascynacja 2,9705 gold badges29 silver badges53 bronze badges 5 |3 Answers
Reset to default 2Path 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.
Have you tried using 'is_alive' instead of 'isAlive'? The error message hints that the function name could have been changed.
Your IntelliJ settings look fine. If not the name issue, you can try to upgrade it to the latest available version.
I updated pycharm to the newest version and the errors were gone
C:\Users\mylogin\AppData\Roaming\JetBrains\IntelliJIdea2024.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_is_thread_alive.py
and changeisAlive
intois_alive
. But if it was created for Python 2 (which was usingisAlive
) then it may have more problems. (PL: powodzenia) – furas Commented Mar 6 at 11:35