[Maya] The case of Xgen and [Error 6] The handle is invalid

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šŸ˜‰

3 thoughts on “[Maya] The case of Xgen and [Error 6] The handle is invalid

  1. 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.)

  2. I’m running into the same issue ( Maya and Windows ), trying to dig for a good enough workaround

    import subprocess
    subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
    will result in:
    >> # WindowsError: [Error 6] The handle is invalid #

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s