<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Run Python script with tSystem on Linux in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Run-Python-script-with-tSystem-on-Linux/m-p/2207346#M7025</link>
    <description>&lt;P&gt;Hello there,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the tSystem config :&lt;/P&gt;
&lt;PRE&gt;"/bin/bash"
"-c"
"source ~/.bashrc &amp;amp;&amp;amp; bash " + context.storage_root_scripts + "text_recognition.sh " + context.storage_root_scripts + "TR_Immobilier.py"&lt;/PRE&gt;
&lt;P&gt;Sending "bash /var/.../text_recognition.sh&amp;nbsp; /var/.../TR_Immobilier.py" to shell&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;text_recognition.sh contains only "python3 $1" to run the python script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mainly use zsh on my personal console and if i configure the tSystem with zsh, then everything works fine for some obscure reason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The python error log is :&lt;/P&gt;
&lt;PRE&gt;Traceback (most recent call last):
  File "/var/www/cadredevie/shared/scripts/TR_Immobilier.py", line 19, in &amp;lt;module&amp;gt;
    from pathlib import Path
ImportError: No module named pathlib&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;Why don't my imports work on talend?&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Kindly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:54:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T04:54:02Z</dc:date>
    <item>
      <title>Run Python script with tSystem on Linux</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-Python-script-with-tSystem-on-Linux/m-p/2207346#M7025</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the tSystem config :&lt;/P&gt;
&lt;PRE&gt;"/bin/bash"
"-c"
"source ~/.bashrc &amp;amp;&amp;amp; bash " + context.storage_root_scripts + "text_recognition.sh " + context.storage_root_scripts + "TR_Immobilier.py"&lt;/PRE&gt;
&lt;P&gt;Sending "bash /var/.../text_recognition.sh&amp;nbsp; /var/.../TR_Immobilier.py" to shell&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;text_recognition.sh contains only "python3 $1" to run the python script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mainly use zsh on my personal console and if i configure the tSystem with zsh, then everything works fine for some obscure reason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The python error log is :&lt;/P&gt;
&lt;PRE&gt;Traceback (most recent call last):
  File "/var/www/cadredevie/shared/scripts/TR_Immobilier.py", line 19, in &amp;lt;module&amp;gt;
    from pathlib import Path
ImportError: No module named pathlib&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;Why don't my imports work on talend?&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Kindly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-Python-script-with-tSystem-on-Linux/m-p/2207346#M7025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python script with tSystem on Linux</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-Python-script-with-tSystem-on-Linux/m-p/2207347#M7026</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Does &lt;FONT face="consolas,"&gt;gpload.py -f gpload.yml &lt;/FONT&gt;&lt;FONT face="consolas,"&gt;run well from &lt;/FONT&gt;command&lt;FONT face="consolas,"&gt; line&lt;/FONT&gt;?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 10:13:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-Python-script-with-tSystem-on-Linux/m-p/2207347#M7026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-30T10:13:46Z</dc:date>
    </item>
  </channel>
</rss>

