This post is about a Maya issue on Window. It’s not an MtoA or Arnold issue.
Whenever I tried to export the selection as an XGen archive, I’d get [Error 6] The handle is invalid.
[Error 6] The handle is invalid xgmArchiveExportBatchUI.py except block xgmArchiveExportBatchUI.py call subprocess.Popen mayapy "C:/Program Files/Autodesk/Maya2014/plug-ins/xgen/scripts/xgenm/xmaya/xgmArchiveExportBatch.py" 0 0 0 1.0 1.0 -destName ["'DragonArchive'"] -destDir ["'C:/Users/SOLIDANGLE/Documents/maya/projects/Support/xgen/archives/'"] -sourceFiles ["'C:/Users/SOLIDANGLE/Documents/maya/projects/Support/scenes/Dragon1.mb'"] -scriptPaths ["'C:/Program Files/Autodesk/Maya2014\\plug-ins\\xgen\\scripts'"] -loadPlugins ["'AbcExport'", "'Mayatomr'", "'xgenMR.py'"] xgmArchiveExportBatchUI logging to C:/Users/SOLIDANGLE/Documents/maya/projects/Support/xgen/archives/DragonArchive.log
Googling [Error 6] The handle is invalid subprocess.Popen led me to the problem: I was starting Maya from the command line. When I started Maya from the Start menu, then the XGen Export Selection worked.
The reason I start Maya from the command line is because that’s the only way I can get the MtoA diagnostics in the Output Window. So something seems a little weird about how Maya handles STDOUT and STDERR 😉
Good to know! I’ve been checking out XGen for MtoA for the last few days, really awesome toolset… just wish it integrated better with a typical cg pipeline (referencing, caching, more flexibility in asset naming etc.)
I’m running into the same issue ( Maya and Windows ), trying to dig for a good enough workaround
subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
will result in:
>> # WindowsError: [Error 6] The handle is invalid #
we are starting maya from a pythonscript (Network, usersetups, same plugins for all pcs….) with os.system(command/path).