Reputation: 11
all of a sudden when running PyCharm Community edition i've started to get this syntax error when running debug mode. I tried reinstalling PyCharm but had no luck with the error. 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
Upvotes: 1
Views: 1338
Reputation: 86
If you have __init__.py
in your current path, delete it.
Or if your file name is code.py
, rename to something else.
Upvotes: 1
Reputation: 91
If you don't care about any project specific configurations or run configurations:
.idea
folder in your project folder 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. Were I to encounter this problem again, I would suggest a different approach:
.idea
folder.idea
folder inside the project folder to a safe location.idea
folder and quit it again.idea
foldersUpvotes: 1