Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!

external program returned an error code:1

Highlighted
6 - Meteoroid

I'm trying to run external python code. Python has been installed on the server, but I still got error message: External program returned error code:1.

 

What does this mean? How to fix it?

 

Thanks

Shirley

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Did you successfully execute this workflow on your local machine?

 

Ben

Highlighted
6 - Meteoroid

Yes, it is running on my local machine, but when I installed python on the server, it returned error code 1

Highlighted
5 - Atom

I have the same problem: Python script executes fine when called from the command line, but fails when it's executed from Alteryx using Run Command module on the same machine.

I configured the Run Command to execute Windows batch file, which is being written by preceding Formula module:

Write Source:

Output: D:\Alteryx_Workflow\python_command_line.bat

Run External program

Command: D:\Alteryx_Workflow\python_command_line.bat

Working directory: C:\Program Files\Python36

Alteryx workflow reports following error: The external program "D:\Alteryx_Workflow\python_command_line.bat" returned error code: 1

When I copy the content of D:\Alteryx_Workflow\python_command_line.bat and run it in C:\Program Files\Python36 directory from the command line console on the same machine, it works fine.

Please, can someone advise what's going wrong there? How can I get more meaningful error message, e.g. console output? Alteryx seems to be very poor at providing helpful error messages.

 

 

Highlighted
5 - Atom

I have managed to get this working - although Alteryx Run Command module has Working Directory set to C:\Program Files\Python36, I had to explicitly change directory in batch file before calling Python script.

So, my batch file that is run by Alteryx Run Command module looks something like this:

cd C:\Program Files\Python36

python.exe D:\Python_scripts\my_script.py argument1

 

Labels