Debugger throwing SyntaxError exception - code runs fine

Completed

~/anaconda/envs/Project/bin/python "~/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 56690 --file ~/Project/Projects/Git/NAME/services/code/ingest/app/main.py
Traceback (most recent call last):
File "~/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_cython_wrapper.py", line 2, in <module>
from _pydevd_bundle.pydevd_cython import trace_dispatch, PyDBAdditionalThreadInfo, global_cache_skips, global_cache_frame_skips
ModuleNotFoundError: No module named '_pydevd_bundle.pydevd_cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "~/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_additional_thread_info.py", line 17, in <module>
from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo
File "~/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_cython_wrapper.py", line 29, in <module>
mod = __import__(check_name)
ModuleNotFoundError: No module named '_pydevd_bundle.pydevd_cython_darwin_36_64'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "~/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevconsole.py", line 8, in <module>
from code import InteractiveConsole
ImportError: cannot import name 'InteractiveConsole'

During handling of the above exception, another exception occurred:

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 76, 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

Process finished with exit code 1

 

 

 

This is the error I see in idea.log:

2017-10-06 16:27:36,779 [1713539] INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/bash -c . '~//anaconda/envs/NIO/bin/activate' '~//anaconda/envs/NIO';'~//Applications/PyCharm CE.app/Contents/bin/printenv.py' '/private/var/folders/c7/dm05542d2r9_24jcxqvywqhnhxph0m/T/intellij-shell-env.tmp'
2017-10-06 16:27:38,127 [1714887] INFO - .intellij.util.EnvironmentUtil - shell environment loaded (21 vars)
2017-10-06 16:27:38,461 [1715221] ERROR - python.debugger.PyDebugProcess - Socket closed
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at com.jetbrains.python.debugger.pydev.MultiProcessDebugger.waitForConnect(MultiProcessDebugger.java:66)
at com.jetbrains.python.debugger.PyDebugProcess$4.run(PyDebugProcess.java:303)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:718)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:343)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - PyCharm Community Edition 2017.2.2 Build #PC-172.3757.67
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - JDK: 1.8.0_152-release
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - VM: OpenJDK 64-Bit Server VM
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - Vendor: JetBrains s.r.o
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - OS: Mac OS X
2017-10-06 16:27:38,462 [1715222] ERROR - python.debugger.PyDebugProcess - Last Action: Debug

0
2 comments
Avatar
Permanently deleted user

I found out what was the reason and I do not understand why it is happening. Due the the presence of __init__.py on parent module. Once I removed that file (empty file) the error stopped.

1
Avatar
Permanently deleted user

Had the same issue and that was the solution. Thanks @Raveendra H !

 

@PyCharm devs: this __init__.py in the parent module should not be (repeatedly) created automatically:

0

Please sign in to leave a comment.