Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Mac Maya 2024 subprocess.Popen not working

Mac Maya 2024 subprocess.Popen not working

simonbenanderson
Participant Participant
502 Views
0 Replies
Message 1 of 1

Mac Maya 2024 subprocess.Popen not working

simonbenanderson
Participant
Participant

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

0 Likes
503 Views
0 Replies
Replies (0)