<?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 Re: Why does this model fail to find a .py file? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285289#M9799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the Store relative path names box?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/132314_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2015 16:10:39 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2015-10-19T16:10:39Z</dc:date>
    <item>
      <title>Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285288#M9798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In Arc GIS 10.2.1, I've written custom toolbox which contains a model which in turn makes use of a .py file that lives in the same folder as the toolbox .tbx file, as shown below:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tbx and py file folder.jpg" class="image-1 jive-image" src="/legacyfs/online/132308_tbx and py file folder.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;When I copy the folder with the .tbx and .py files to a new machine in order to run the model, the model APSAddDataAreaToLasDataset displays a red x next to it indicating that it has a problem.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model shows a red x in arc catalog.jpg" class="image-1 jive-image" src="/legacyfs/online/132309_model shows a red x in arc catalog.jpg" style="width: 620px; height: 188px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be that the model cannot find the file AddShapeConstraint.py that it needs.&amp;nbsp; The tool AddShapeConstraint has a red x next to it in the Model Builder editor.&amp;nbsp; Also the Edit option is missing from the Properties of the tool in model builder, shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model editor shows broken reference to py file.jpg" class="image-1 jive-image" src="/legacyfs/online/132310_model editor shows broken reference to py file.jpg" style="width: 620px; height: 347px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remove the tool AddShapeConstraint from the model and then add it back in from the Insert-&amp;gt;Tool menu item, then the model can find the .py file and everything works.&amp;nbsp; Does anyone know why the model cannot find the .py file, and therefore I must delete and then add back the tool to the model whenever I copy this custom toolbox and its .py files to a new machine?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problematic file AddShapeConstraint.py is attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 16:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285288#M9798</guid>
      <dc:creator>TheodoreRakel</dc:creator>
      <dc:date>2015-10-19T16:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285289#M9799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the Store relative path names box?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/132314_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 16:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285289#M9799</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-10-19T16:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285290#M9800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is everything in the same location? ie scripts, models etc?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 16:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285290#M9800</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-19T16:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285291#M9801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did NOT check the Store relative path names box.&amp;nbsp; I changed to having the Store relative path names box checked, but it stills behaves the same way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:17:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285291#M9801</guid>
      <dc:creator>TheodoreRakel</dc:creator>
      <dc:date>2015-10-19T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285292#M9802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, all files are in 1 folder.&amp;nbsp; In fact, there's a second model in the custom toolbox I wrote that uses a .py file and it works fine.&amp;nbsp; I can't see any difference between the one that works and the one that doesn't.&amp;nbsp; Except for the 'store relative path names' check box.&amp;nbsp; That was unchecked but I changed it to checked and still get the same behavior.&amp;nbsp; Leaving that unchecked would explain the problem, I suppose, but that oversight has been addressed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:20:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285292#M9802</guid>
      <dc:creator>TheodoreRakel</dc:creator>
      <dc:date>2015-10-19T17:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285293#M9803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should have mentioned that I developed the custom tool box and models on a 32 bit machine.&amp;nbsp; That's what the client provided me with.&amp;nbsp; The custom toolbox gets copied to 64 bit machines.&amp;nbsp; This could account for the issue.&amp;nbsp; I'm going to get this to work on a 64 bit machine properly and stop using the 32 bit machine.&amp;nbsp; This may fix the problem, but if it does I don't know why.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:27:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285293#M9803</guid>
      <dc:creator>TheodoreRakel</dc:creator>
      <dc:date>2015-10-19T17:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this model fail to find a .py file?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285294#M9804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This corrected the problem.&amp;nbsp; I tested incorrectly at first but now I can see that this fixes the problem.&amp;nbsp; Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/why-does-this-model-fail-to-find-a-py-file/m-p/285294#M9804</guid>
      <dc:creator>TheodoreRakel</dc:creator>
      <dc:date>2015-10-19T17:34:02Z</dc:date>
    </item>
  </channel>
</rss>

