Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I am using Eclipse & PyDev for the first time. Great job on PyDev. Everything seems pretty straight forward.
I am having problems using debugger on LINUX/Windows. The following errors come up when I try to launch the debugger:
Traceback (most recent call last):
File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 775, in ?
File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 434, in connect
File "/home/kalyan/eclipse/plugins/org.python.pydev.debug_0.8.5/pysrc/pydevd.py", line 427, in startClient
except timeout, e:
NameError: global name 'timeout' is not defined
Is it a problem only with me?
Which python version are you using?
version 2.2.3. RHEL3 Update 2
Hummm.. the problem is the debugger relies on a timeout exception available at python 2.3. So, you basically need python 2.3 or older to use it.
From python docs:
This exception is raised when a timeout occurs on a socket which has had timeouts enabled via a prior call to settimeout(). The accompanying value is a string whose value is currently always ``timed out''. New in version 2.3.
ah! Thought it could be a version problem. Turns out the same.
I am not sure if this is mentioned in the requirements section of PyDev.
I'm not sure, but I'll take a look at that...
I am still unable to use the debugger. I have set the environment (via command prompt and launching eclipse from there and also via system->advanced->env vars) and also PYDEV PYTHONPATh in project preferences. The code completion works like a charm - no problems. It can see my modules and also the module contents. Python shell can import the modules with out any issues.
However, when i try to run or debug the code, my main script cannot import the same modules.
windows XP SP1, Python 2.4, Eclipse 3.0.1, SUN JAVA 1.5.0_01
You make a simple run through pydev:
and see if it matches the pythonpath you're expecting.
If it does not, for some reason, your enviroment PYTHONPATH is still not correctly set... (don't forget to set it all in CAPS).
Also, after setting in the system->adv->env, you have to reboot eclipse to get the new changes...
thank you. turns out the problem is not with importing my modules, but module pwd. I was developing a code for LINUX but wanted to switch to eclipse from Eric and was experimenting with eclipse on my windows laptop. I blindly took the code I was developing and tried it here. I was also catching the ImportError exception and diplaying failed to load modules. It never occured to me that importing system modules might be a problem.