PyDev 2.6 is unable to run my project: https://github.com/MestreLion/singularity
Error Dialog shown:
'Launching singulaity singularity' has encountered a problem.
Unexpected error setting up the debugger
Socket closed
And console output is:
Traceback (most recent call last):
File "/home/rodrigo/.local/opt/eclipse/plugins/org.python.pydev_2.6.0.2012062818/pysrc/pydevd.py", line 4, in <module>
from pydevd_comm import CMD_CHANGE_VARIABLE, \
File "/home/rodrigo/.local/opt/eclipse/plugins/org.python.pydev_2.6.0.2012062818/pysrc/pydevd_comm.py", line 78, in <module>
import pydevd_console
File "/home/rodrigo/.local/opt/eclipse/plugins/org.python.pydev_2.6.0.2012062818/pysrc/pydevd_console.py", line 3, in <module>
from code import InteractiveConsole
ImportError: cannot import name InteractiveConsole
Since it runs perfectly other projects, and only error on this one, I beleive the problem is:
That project has a "code" package, and judging by the error, so does PyDev ("from code import InteractiveConsole")
It worked fine on PyDev 2.5. I haven't tested yet in PyDev 2.7
I've just upgraded PyDev to 2.7 (using Eclipse's Help -> Check for Updates), and the problem is still there.
I've also deleted all ./.project and ./.pydevproject files and ./.settings/ dir and re-created the projecte from scratch, to rule out any config cruft from 2.5 and 2.6. Still error.
Lastly I temporarily renamed my "code" package to "codes", and PyDev worked without that problem. Of course, my project didn't, unless I also rename all references from "code" to "codes", and I won't change all my source code just to fit a PyDev limitation.
Maybe this can be fixed by using relative imports in PyDev's source? This way it would not conflict with users' projects.
Last but not least, the bug only manifests itself if there are active breakpoints in code. Otherwise it runs fine (maybe because no brakepoints means no debugger, thus no import conflict with Interactive debugger?)
Hope this helps fix the problem quickly