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?
我已经安装了Pycharm 3.1(最新版本),据说它支持python 3.4,然而,今天早上我运行调试器时,它就开始抛出异常。我能做些什么来修复这个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
最后,我删除了.py文件并在一个新文件中重新创建代码,之后,调试器工作正常。我不知道是什么腐蚀了这些文件,但我注意到它已经发生在不同的场合。AssertionError是其中之一。另一次,.py文件损坏,解释器抛出了一个异常,我没有为unicode char支持定义编码样式,尽管我有
# -*- 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.
令我惊讶的是,即使删除了整个代码(包括#——编码:utf-8——)并调用了一个简单的print() func,它仍然会继续抛出错误!然后,我再次完全删除文件并从头开始。我真的很震惊,我不知道这是怎么发生的。
2 个解决方案
#1
5
I meet this problem by using PyCharm 3.1.1 and Python 3.4.0 in Windows.
我在Windows中使用PyCharm 3.1.1和Python 3.4.0来解决这个问题。
This is a bug(http://youtrack.jetbrains.com/issue/PY-12317), which is marked "Fixed in 3.1.2".
这是一个bug(http://youtrack.jetbrains.com/issue/PY-12317),它被标记为“3.1.2中修复”。
Thus, I download PyCharm 3.1.2RC2(build 133.1143) in JetBrains PyCharm Preview (EAP) page. And, that version solved this problem.
因此,我下载了PyCharm 3.2 rc2 (build 133.1143)在JetBrains PyCharm预览(EAP)页面上。这个版本解决了这个问题。
#2
0
I had the same issue with my Mac version and http://download.jetbrains.com/python/pycharm-community-133.1262.dmg solved it
我的Mac版本也有同样的问题,http://download.jetbrains.com/python/pycharm-community-133.1262.dmg解决了这个问题
#1
5
I meet this problem by using PyCharm 3.1.1 and Python 3.4.0 in Windows.
我在Windows中使用PyCharm 3.1.1和Python 3.4.0来解决这个问题。
This is a bug(http://youtrack.jetbrains.com/issue/PY-12317), which is marked "Fixed in 3.1.2".
这是一个bug(http://youtrack.jetbrains.com/issue/PY-12317),它被标记为“3.1.2中修复”。
Thus, I download PyCharm 3.1.2RC2(build 133.1143) in JetBrains PyCharm Preview (EAP) page. And, that version solved this problem.
因此,我下载了PyCharm 3.2 rc2 (build 133.1143)在JetBrains PyCharm预览(EAP)页面上。这个版本解决了这个问题。
#2
0
I had the same issue with my Mac version and http://download.jetbrains.com/python/pycharm-community-133.1262.dmg solved it
我的Mac版本也有同样的问题,http://download.jetbrains.com/python/pycharm-community-133.1262.dmg解决了这个问题