Jump to content

Subprocess stdout


tokejepsen

Recommended Posts

Posted

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.

Posted
On 5/26/2016 at 6:27 PM, tokejepsen said:

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

 

Could you supply some source code examples that I can try with?

Posted
Posted

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:

Archived

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

×
×
  • Create New...