[英]Pycharm Debug mode syntax error
all of a sudden when running PyCharm Community edition i've started to get this syntax error when running debug mode.在运行 PyCharm 社区版时,突然间我开始在运行调试模式时遇到此语法错误。 I tried reinstalling PyCharm but had no luck with the error.
我尝试重新安装 PyCharm,但没有遇到错误。 Anyone see this before?
有谁见过这个吗?
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 26, in <module>
from _pydevd_bundle.pydevd_additional_thread_info import PyDBAdditionalThreadInfo
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_additional_thread_info.py", line 19, in <module>
from _pydevd_bundle.pydevd_additional_thread_info_regular import PyDBAdditionalThreadInfo # @UnusedImport
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_additional_thread_info_regular.py", line 5, in <module>
from _pydevd_bundle.pydevd_frame import PyDBFrame
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_frame.py", line 10, in <module>
from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_breakpoints.py", line 15, in <module>
from _pydevd_bundle.pydevd_comm import get_global_debugger
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 75, in <module>
import pydevconsole
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevconsole.py", line 10, in <module>
from _pydevd_bundle.pydevconsole_code_for_ironpython import InteractiveConsole
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevconsole_code_for_ironpython.py", line 105
except SyntaxError, err:
^
SyntaxError: invalid syntax
If you don't care about any project specific configurations or run configurations:如果您不关心任何项目特定的配置或运行配置:
.idea
folder in your project folder.idea
文件夹 I've used this method as a quick fix solution when I encountered this issue late last night.昨晚深夜遇到此问题时,我已将此方法用作快速修复解决方案。 But, the very nature of this solution indicates that this issue is caused by some corruption in the
.idea
folder.但是,此解决方案的本质表明此问题是由
.idea
文件夹中的某些损坏引起的。 Were I to encounter this problem again, I would suggest a different approach:如果我再次遇到这个问题,我会建议一种不同的方法:
.idea
folder.idea
文件夹中的文件中搜索错误文本.idea
folder inside the project folder to a safe location.idea
文件夹移动到安全位置.idea
folder and quit it again.idea
文件夹并再次退出.idea
folders.idea
文件夹之间进行三向合并If you have __init__.py
in your current path, delete it.如果当前路径中有
__init__.py
,请将其删除。 Or if your file name is code.py
, rename to something else.或者,如果您的文件名是
code.py
,请重命名为其他名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.