On Tuesday, 2 April 2013 13:59:33 UTC+11, Jeremy YeoKhoo  wrote:
> Hi guys,
> 
> Im trying to execute a subprocess.Popen from the mayapy where it launches a 
> python script. Im trying to do it from an external python interpreter 
> (mayapy) because Im trying to export a file with an unloaded plugin. (Im 
> getting problems with unloading the plugin as it keeps crashing my maya 
> session.) So everything exports fine but its a little annoying that my maya 
> session crashes. 
> 
> Heres my command line:
> mayaPath= 'c:/program files/autodesk/maya2012/bin/mayapy.exe'
> scriptPath= <some script>
> filename= <some file>
>         subprocess.Popen(mayaPath+' '+scriptPath+' 
> '+filename,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
> 
> I get the following error:
> # Error: WindowsError: file C:\Program 
> Files\Autodesk\Maya2012\bin\python26.zip\subprocess.py line 786: 6 # 
> 
> Could someone help?
> 
> I have set environment variable to my PYTHONPATH to python's site packages 
> from the Maya folder. And have set the MAYA_LOCATION to the maya's install 
> location (Which I dont think was necessary)
> 
> 
> This is painful....

Hi Justin, thanks again.

I have actually tried running the code explicitly, taking care of the necessary 
whitespaces. Actually works on my machine at home using maya2011 with the same 
line but seem to return that error from the machine at work. Ive even checked 
network permissions. And running a simpler function. But no cigar....

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to