Jump to content

Subprocess stdout


tokejepsen

Recommended Posts

I'm trying to query an executable and get the output of that query.

When I try to do any form of stdout from subprocess like, PIPE or stdout to file, and run through ftrack connect it fails.

I'm currently working around the problem by using os.system, with a command that outputs to a file.

Link to comment
Share on other sites

Link to comment
Share on other sites

Get this interesting error;

tog/tog_ep001_StarCatching/sc010/sc010sh010/animation/v006
Traceback (most recent call last):
  File "K:\development\tools\ftrack\ftrack-hooks\generate_titles.py", line 141, in create_job
    south_west_text, south_east_text, north_west_text)
  File "K:\development\tools\ftrack\ftrack-hooks\generate_titles.py", line 60, in generate_title
    resolution = subprocess.check_output([os.path.join(image_magick_dir, 'identify.exe'), '-format', '%wx%h', '%s[1]' % input_file])
  File "C:\Python27\lib\subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "C:\Python27\lib\subprocess.py", line 702, in __init__
    errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
  File "C:\Python27\lib\subprocess.py", line 833, in _get_handles
    p2cread = self._make_inheritable(p2cread)
  File "C:\Python27\lib\subprocess.py", line 884, in _make_inheritable
    _subprocess.DUPLICATE_SAME_ACCESS)
WindowsError: [Error 6] The handle is invalid

Seems to be something to do with ftrack-connect running without a console, I think :unsure:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...