Hello,
Does anyone know if we always have to use .exe to run the run command tool or if we can use .py?
Although write source and read results are optional in run command tool, I got an error message that the tool requires an input or output file to specify.
Sincerely,
Kazumi
Solved! Go to Solution.
Hi @knozawa,
You can use .py as well. You can run anything that you can run from a command prompt.
The error message you have is correct, you need either an input or an output. If you don't need it, then just attach a text input with a dummy field and write it to %temp%\e.1 or something similar.
Thank you for your reply. I'm still getting an error message.
This is my Run Command Tool configuration.
I also attached a sample workflow.
Thank you,
Kazumi
This is because you had a browse tool afterwards and nothing in the Read results.
Process:
Anything that is connected to the In put of the Run Command will write out to 'Write Source'
The Run External Program part will run
Anything in Read Results will write out to the Output of the Run Command Tool
So, if you have something connected to the input, then 'Write Source' will need to be completed. If you have anything connected to the Output, 'Read Results' will have to be filled out. One of those, has to be connected.
Thank you for your response. If I want to use a Run Command Tool in the middle of the workflow, I cannot use the tool because I need either input or output tool, is that correct? Is there any way that the run command tool can read the incoming data using read.Alteryx("#1", mode="data.frame") like a R tool?
Sincerely,
Kazumi
No, the data would need to be written out to somewhere. So, whatever comes in to the Run Command Tool will be written out to the file specified in the 'Write Source'. Your Python code can then pick that file up.
Note: Watch out later this year for integrated Python support. If you weren't fortunate enough to make it to Inspire this year, you can check out the keynotes and sessions here.
I have tried doing the same thing with this as you instructed . But still i am getting some error .
Run Command (6) You must specify a sheet name.
Run Command (6) Failed to run external program "C:\Users\chowdhuryr\Desktop\Code\GUI.py": %1 is not a valid Win32 application.
I am also uploading a screen shot of my model with the run command tool .
Any help will is highly appreciated .
Thanks ,
Ratul .
There are 2 separate errors here