Using the tSystem component

Four Stars

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)

 

Forteen Stars

Re: Using the tSystem component

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

-----------
Four Stars

Re: Using the tSystem component

I have set path for python through environment variable..

their is another way to set path?

can u tell me?

 

Forteen Stars

Re: Using the tSystem component

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

Screen Shot 2019-03-16 at 1.31.36 AM.png

 

you also could define path in tSystem self:

Screen Shot 2019-03-16 at 1.35.27 AM.png

 

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

-----------
Four Stars

Re: Using the tSystem component

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..?

Forteen Stars

Re: Using the tSystem component

You need add path to python!

“C:\\python36\\pyton c:\\somewhere\\somefile.py”
-----------

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog