<?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 can't find the file path generated by Set Path Variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/can-t-find-the-file-path-generated-by-Set-Path-Variable/m-p/285857#M55173</link>
    <description>&lt;P&gt;I have a repo in following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;repo:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name.jsl&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dir_A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;root.jsl&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dir_B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; example.jsl&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root.jsl&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;As repo is cloned for each user in different location. I have generated a a script which calls Python and always find the absolute path of the repo and set it as root.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cur_dir = Substr( Get Default Directory(), 2, 999 );
cur_dir = Substitute( cur_dir, "/", "\" );
show(cur_dir);
_path_script = cur_dir || "find_home_directory.py";
show(_path_script);

home_dir = RunProgram(
					executable( "python" ),
					options( _path_script),
					readfunction( "text" )
				);
Set Path Variable( "root", home_dir );
Get Path Variable("root");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example.jsl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Include("../dir_A/root.jsl");
Get Path Variable("root");&lt;BR /&gt;_var&amp;nbsp;=&amp;nbsp;"$root/name.jsl"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I checked and found the root is setup correctly and pointing to right directory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;I'm getting error for _var.&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;&lt;STRONG&gt;Error with file: Path is invalid:&lt;/STRONG&gt; &lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:34:50 GMT</pubDate>
    <dc:creator>Dib-Dey</dc:creator>
    <dc:date>2023-06-09T23:34:50Z</dc:date>
    <item>
      <title>can't find the file path generated by Set Path Variable</title>
      <link>https://community.jmp.com/t5/Discussions/can-t-find-the-file-path-generated-by-Set-Path-Variable/m-p/285857#M55173</link>
      <description>&lt;P&gt;I have a repo in following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;repo:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name.jsl&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dir_A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;root.jsl&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dir_B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; example.jsl&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root.jsl&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;As repo is cloned for each user in different location. I have generated a a script which calls Python and always find the absolute path of the repo and set it as root.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cur_dir = Substr( Get Default Directory(), 2, 999 );
cur_dir = Substitute( cur_dir, "/", "\" );
show(cur_dir);
_path_script = cur_dir || "find_home_directory.py";
show(_path_script);

home_dir = RunProgram(
					executable( "python" ),
					options( _path_script),
					readfunction( "text" )
				);
Set Path Variable( "root", home_dir );
Get Path Variable("root");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example.jsl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Include("../dir_A/root.jsl");
Get Path Variable("root");&lt;BR /&gt;_var&amp;nbsp;=&amp;nbsp;"$root/name.jsl"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I checked and found the root is setup correctly and pointing to right directory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;I'm getting error for _var.&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;&lt;STRONG&gt;Error with file: Path is invalid:&lt;/STRONG&gt; &lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:34:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/can-t-find-the-file-path-generated-by-Set-Path-Variable/m-p/285857#M55173</guid>
      <dc:creator>Dib-Dey</dc:creator>
      <dc:date>2023-06-09T23:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: can't find the file path generated by Set Path Variable</title>
      <link>https://community.jmp.com/t5/Discussions/can-t-find-the-file-path-generated-by-Set-Path-Variable/m-p/310895#M56408</link>
      <description>&lt;P&gt;try. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;get path variable("$root");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in your example&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;Get Path Variable("root");_var = "$root/name.jsl"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP is trying to evaluate _var="$root/name.jsl"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I don't think the first char of the var name can be a special character or number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:06:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/can-t-find-the-file-path-generated-by-Set-Path-Variable/m-p/310895#M56408</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2020-09-22T14:06:50Z</dc:date>
    </item>
  </channel>
</rss>

