I have Pycharm 3.1 installed (latest version) which supposedly supports python 3.4, however, this morning it started throwing exceptions whenever I run debugger. Is there anything I can do to fix this AssertionError?
C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port xx --file C:/Users/xx/PycharmProjects/drop/my_file.py
Connected to pydev debugger (build 133.881)
pydev debugger: process 8492 is connecting
None
Exception in thread pydevd.CheckAliveThread:
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 921, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd_comm.py", line 252, in run
self.OnRun()
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 187, in OnRun
self.stop()
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd_comm.py", line 262, in stop
_Thread_stop(self)
File "C:\Python34\lib\threading.py", line 990, in _stop
assert not lock.locked()
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 996, in trace_dispatch
if not t.isAlive():
File "C:\Python34\lib\threading.py", line 1120, in is_alive
self._wait_for_tstate_lock(False)
File "C:\Python34\lib\threading.py", line 1076, in _wait_for_tstate_lock
assert self._is_stopped
AssertionError
Process finished with exit code -1
-- Edit --
I ended up deleting the .py file and recreating the code in a new file, after that, debugger works correctly.
I am not sure what corrupts these files, but I have noticed it has happened on several different occasions. AssertionError was one of those times.
Another time a .py file got corrupted and the interpreter was throwing an exception that I haven't defined a coding style for unicode char support, even though I had
# -*- coding: utf-8 -*-
What surprised me, even after deleting the whole code (including # -- coding: utf-8 --) and basically calling a simple print() func it would still continue throwing the error! Then again I ended up completely deleting the file and starting from scratch. I felt really shocked, I have no idea how this happened.