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: 
Anonymous
Not applicable

Using the tSystem component

Hi,

I m running my python script by using tSystem by help of python \"D:\\Talent-Two\\pdf.py this command

 

but after running job their was error :

 

Exception in component tSystem_1 (Conversion_of_files)
java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at talent_sample_one.conversion_of_files_0_1.Conversion_of_files.tSystem_1Process(Conversion_of_files.java:341)
at talent_sample_one.conversion_of_files_0_1.Conversion_of_files.runJobInTOS(Conversion_of_files.java:695)
at talent_sample_one.conversion_of_files_0_1.Conversion_of_files.main(Conversion_of_files.java:544)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)

 

Labels (3)
6 Replies
vapukov
Master II
Master II

first you need to check - is python available in your PATH variable

 

could you run python from windows command line console?

 

then you have 2 choices:

  • use full path for python
  • add path to python in global system path

keep also in mind in windows when you have folders with spaces in PATH, it could be not work in some cases (not sure is it affected there or not), but you could put path to python to first place

Anonymous
Not applicable
Author

I have set path for python through environment variable..

their is another way to set path?

can u tell me?

 

vapukov
Master II
Master II

first - you could check, what PATH available for tSystem, with simple job:

0683p000009M3SL.png

 

you also could define path in tSystem self:

0683p000009M3SV.png

 

3rd - if you under windows do not use "cmd /c " for start shell, it also could return error similar for yours

Anonymous
Not applicable
Author

i m using windows and i have wriiten python script path in single command as

"python \"D:\\Convert2.py" see in image file that i have send .

 

is it write?

or there is another way for defining path for script file..?


error.png
vapukov
Master II
Master II

You need add path to python!

“C:\\python36\\pyton c:\\somewhere\\somefile.py”
jagadish_dasari
Contributor III
Contributor III

Hi,

 

Try the below steps and see:

 

1. SET PYTHON IN ENVINRONMENT VARIABLE PATH:

Example: <existing path settings>;C:\PYTHON\PYTHON_385\python.exe

 

2. VERIFY IN A NEW CMD PROMPT (windows): use the command 'echo %PATH%'

Example: C:\PYTHON\PYTHON_385\python.exe - Is the executable file

 

Microsoft Windows [Version 6.3.9600]

(c) 2013 Microsoft Corporation. All rights reserved.

 

C:\Users\jdasari>echo %PATH% 

C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\W

t SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server

r\130\Tools\Binn\ManagementStudio\;C:\PYTHON\PYTHON_385

 

3. RE-START THE TALEND: 

Talend Studio or server sources the PATH at the start-up only. 

For these changes to reflect restart is mandatory.

 

4. tSystem PYTHON SCRIPT CALL:

"cmd /c python D:\\Python_Global\\Development_Reports_15SEP2020.py"

 

Hope this works fine!

 

Thanks,

Jagadish.