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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run Python script with tSystem on Linux

Hello there,

I'm running TOS on Linux(Ubuntu 18) and I wish to exec a python script on a tSystem. This should be easy but my python bugs on imports even though running my script alone in console works fine.

 

This is the tSystem config :

"/bin/bash"
"-c"
"source ~/.bashrc && bash " + context.storage_root_scripts + "text_recognition.sh " + context.storage_root_scripts + "TR_Immobilier.py"

Sending "bash /var/.../text_recognition.sh  /var/.../TR_Immobilier.py" to shell

 

The text_recognition.sh contains only "python3 $1" to run the python script.

 

I mainly use zsh on my personal console and if i configure the tSystem with zsh, then everything works fine for some obscure reason.

 

The python error log is :

Traceback (most recent call last):
  File "/var/www/cadredevie/shared/scripts/TR_Immobilier.py", line 19, in <module>
    from pathlib import Path
ImportError: No module named pathlib

Why don't my imports work on talend?

Kindly

 

 

Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hello,

Does gpload.py -f gpload.yml run well from command line?

Best regards

Sabrina