I upgraded eclipse from 3.6 to 4.2 and Aptana from 2 to 3 with pydev
Now I cannot get the debugger to work. I get the following errors:
Traceba
If you're encountering this error, check to make sure you don't have any other code.py
modules in your PYTHONPATH - ie, in your project. For example I was using web.py and the tutorial has you create a code.py
file - renaming this to main.py
, the debugger was able to import InteractiveConsole
from the correct module (the one in python27\lib).
I think that the problem is that the import:
from code import InteractiveConsole
is giving an ImportError. Check if the 'code' module is in your PYTHONPATH (should be at the Python lib: Python/lib/code.py
)
I.e.: Open a shell in the command line:
[07:55:55 X:\]python
Python 2.7.2 (default, Feb 23 2012, 00:24:32) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import code
>>> code.__file__
'c:\\bin\\python-2.7.2\\lib\\code.pyc'
If it's really not there, it's a problem in your Python install (should definitely be there).