Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mac Maya 2024 subprocess.Popen not working

0 REPLIES 0
Reply
Message 1 of 1
simonbenanderson
347 Views, 0 Replies

Mac Maya 2024 subprocess.Popen not working

Hi Community and Autodesk Devs,

 

I am currently trying to use mayabatch to call a mel file which will perform a bunch of python tasks.

I am on an M1 Silicon Mac, using OS Ventura

 

To launch mayabatch I am using python's subprocess.Popen command. Sadly it looks like it is not working.

 

What currently happens, mayabatch launches and then completes, it does not seem to register the -script or the -command. I have tried it with both mayabatch and maya -batch, and get the same results.

I have also tried with run and check_call, in every scenario no error appears, it just doesn't seem to evaluate the extra attributes.

 

I have also tried different formatting of the input array, to no avail.

 

If I run the command in a OSX Terminal it evaluates correctly.

 

The following is the array of data I pass in to popen

['/Applications/Autodesk/maya2024/Maya.app/Contents/bin/maya -batch', '-script', '/var/folders/z2/jc4yqlqn5hz06r32v625tdkr0000gn/T/tmpk32i15tp.mel']

 

This is the concatinated version I run in Terminal.
/Applications/Autodesk/maya2024/Maya.app/Contents/bin/maya -batch -script /var/folders/z2/jc4yqlqn5hz06r32v625tdkr0000gn/T/tmpk32i15tp.mel

 

Any help on getting a command to register correctly on Mac using open in Maya would be greatly appreciated.

 

Thanks,

Simon

Labels (4)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report