The following forum message was posted by bntheman at 
http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4058123:

Ok,
so this is real annoyiing. When i go to debug the above script in Eclipse, i
am back to getting that cannot find error again.
Could not copy all of the files it could not find, since I do not have an 
internet
connection with my PC, but here are some of them...

[code]
pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly
compiled (internal generated filenames are not absolute)
pydev debugger: The debugger may still function, but it will work slower and
may miss breakpoints.

pydev debugger: Unable to find the real location of 'C:\Program
Files\AutoDesk\Maya2008\bin\python25.zip\threading.py
pydev debugger: Unable to find the real location of 'C:\Program
Files\AutoDesk\Maya2008\bin\python25.zip\stat.py

Also, I found out some things that I was doing wrong. 
1. I noticed that mayapy.exe is really picky with which version of python you
are suppose to use. You cannot have Python 2.5 or 2.5.4. Nope, must be Python
2.5.1.

2. Once I fixed that, I then noticed that for each script I run, I must change
the current working directory to 'C:\...\Maya2008\bin'. So now my script looks
like this....

import pydevd; pydevd.settrace()
import maya.standalone as ms
ms.initialize(name='python')

import maya.cmds as cmds
results = cmds.polyplane(name = 'myPlane', ch =1, w = 1, cuv = 2)
print results[0]
[/code]

...but that was not the end of it. When I go to run this script I still get
a traceback error, and the really annoying part is the fact that my script works
in Python's IDLE. So what I did was, I printed the results of cmds in Python
IDLE and it points to...
"C:\Program Files\Autodesk\Maya2008\Python\Libs\site-packages"
.... and when I run the script in Eclipse it is pointing to somewhere else,
I forget where. However, the weird part is that I made sure that C:\Program
Files\Autodesk\Maya2008\Python\libs\site-packages was the last thing listed
in my system libraries path. In spite of this, and I am not sure if this would
be the correct way of doing this, but I had setup a Run configuration, and 
entered
the above correct path in the Envrioment Tab like so...

I set the variable to PYTHONPATH 
and the value to C:\Program Files\Autodesk\Maya2008\Python\libs\site-packages

.... and that fixed that problem, but I am not sure why when I go to debug mode,
I get those cannot find errors.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to