I was trying to use below python code in FME. But it is throwing an error i.e. '<TypeError>: bufsize must be an integer'. Can anyone help me on this to get it resolved? I will provide the complete script on request if required.
Thanks in advance
#Code used in python caller arg1 = ['pg_dump', '-t', 'schema1_table1', 'server1_conn','|','psql', 'local_conn'] proc = subprocess.Popen(arg1,cwd=directory, shell=True,stdin=PIPE)
I'm suspecting you cannot pipe ("|") the output the way you're doing, you probably need to specify the stdout parameter to subprocess.Popen() instead, and take it from there.
There is no issue with the pipe("|") character. Actually the error was with the variable declaration and some syntax in the argument value e.g. 'server1_conn'. After correcting it the python caller is working fine. I have used this 'subprocess.popen' method to get control on the child process like below. Your comment helped me to explore more on subprocess.Popen() documentation. Thank you for the support
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
I'm suspecting you cannot pipe ("|") the output the way you're doing, you probably need to specify the stdout parameter to subprocess.Popen() instead, and take it from there.
I'm suspecting you cannot pipe ("|") the output the way you're doing, you probably need to specify the stdout parameter to subprocess.Popen() instead, and take it from there.
There is no issue with the pipe("|") character. Actually the error was with the variable declaration and some syntax in the argument value e.g. 'server1_conn'. After correcting it the python caller is working fine. I have used this 'subprocess.popen' method to get control on the child process like below. Your comment helped me to explore more on subprocess.Popen() documentation. Thank you for the support
There is no issue with the pipe("|") character. Actually the error was with the variable declaration and some syntax in the argument value e.g. 'server1_conn'. After correcting it the python caller is working fine. I have used this 'subprocess.popen' method to get control on the child process like below. Your comment helped me to explore more on subprocess.Popen() documentation. Thank you for the support