Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
matt-rx
Contributor II
Contributor II

Running Python Code as a Supporting Task

Hi, I’m trying to run a Python code as a supporting task. I’ve created a bat file that contains 

@Echo off
"C:\Program Files (x86)\python.exe" "D:\QV\Data\python_code.py"

I provide it as a parameter in the supporting task. However, after reloading, it returns: 

(27.03.2025 14:58:57) Information: Executing "D:\QV\Scripts\run_python.bat"

(27.03.2025 14:58:57) Information: Executing commandline: "D:\QV\Scripts\run_python.bat" in folder "D:\QV\Scripts".

(27.03.2025 14:58:58) Error: The process exited with non-zero ExitCode (1) at 27.03.2025 14:58:58

(27.03.2025 14:58:58) Error: The task "run_python.bat" failed. Exception: || QDSMain.Exceptions.TaskFailedException: The process exited with non-zero ExitCode (1) at 27.03.2025 14:58:58 || at QDSMain.ExternalProgramTask.Execute(IExecutingTaskResult executingTaskResult) || at QDSMain.Task.AbstractTask.TaskExecution(CurrentExecutionArgs args)

Parameters
Command line statement:"D:\QV\Scripts\run_python.bat"

Labels (1)
1 Solution

Accepted Solutions
matt-rx
Contributor II
Contributor II
Author

The problem is solved. The Qlik user on the server couldn't see the Python package 'paramiko'. When I added traceback exception logging, I was able to identify the issue.

View solution in original post

3 Replies
henrikalmen
Specialist II
Specialist II

It seems like the python script was called, but that the python script ended with an error. I'd start investigating the python script rather than the execution trigger in qlik.

matt-rx
Contributor II
Contributor II
Author

The script run by the bat file is being processed; at the beginning, it only shows a message about running the 32-bit Python on a 64-bit server. I'll check the version change when I have some free time.

matt-rx
Contributor II
Contributor II
Author

The problem is solved. The Qlik user on the server couldn't see the Python package 'paramiko'. When I added traceback exception logging, I was able to identify the issue.