RESOLVED: (TD specific) 'StdoutCatcher' object has no attribute 'fileno'

import sys
import subprocess
subprocess.Popen(["pip", "install" ,"pandas"], stdout = sys.stdout, stderr = sys.stderr)

works fine in python console, but in TD

python >>> 
Traceback (most recent call last):
  File "</project1/text4:op('/project1/text4').run()>", line 1
td.Error: File "/project1/text4", line 3
  File "C:\Program Files\Derivative\TouchDesigner.2020.23680\bin\lib\", line 728, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "C:\Program Files\Derivative\TouchDesigner.2020.23680\bin\lib\", line 1057, in _get_handles
    c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
AttributeError: 'StdoutCatcher' object has no attribute 'fileno'
Results of run operation resulted in exception.

Thanks for the example.
We’ll investigate to see what would be an appropriate value for that method.

Hi Achim
Popen does not work with file like objects:

They require a low level operating system file descriptor for inter process communication unfortunately.