<?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: Geoprocessing script project data source broken in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-script-project-data-source-broken/m-p/167554#M6640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You may want to change the line that creates the output folder to use the existing variable. A colleague told me about issues publishing scripts that include the '\' character. Apparently, the process uses strict checking and looks for any string that may be a path to see if it exists. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the code would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
outputDir = os.path.join(scriptPath,"ScratchAPD")
if not os.path.exists(outputDir):
&amp;nbsp;&amp;nbsp;&amp;nbsp; os.mkdir(outputDir)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:44:04 GMT</pubDate>
    <dc:creator>GregYetman</dc:creator>
    <dc:date>2021-12-11T08:44:04Z</dc:date>
    <item>
      <title>Geoprocessing script project data source broken</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-script-project-data-source-broken/m-p/167553#M6639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to publish a fairly simple Geoprocessing script that will allow a user to extract some points to a zipped shapefile.&amp;nbsp; When I try to publish this service to ArcServer 10.2.1 it reports that the scratch folder I'm using for the shapefile: "script contains broken project data source."&amp;nbsp; Here is the code referencing the scratch folder:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
outputDir = os.path.join(scriptPath,"ScratchAPD")
if not os.path.exists(outputDir):
&amp;nbsp;&amp;nbsp;&amp;nbsp; os.mkdir(scriptPath+"\\ScratchAPD")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I get this to successfully publish?&amp;nbsp; Is there a different method of referencing a scratch folder that will be used in a geoprocessing script?&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 05:38:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-script-project-data-source-broken/m-p/167553#M6639</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2014-01-20T05:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing script project data source broken</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-script-project-data-source-broken/m-p/167554#M6640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You may want to change the line that creates the output folder to use the existing variable. A colleague told me about issues publishing scripts that include the '\' character. Apparently, the process uses strict checking and looks for any string that may be a path to see if it exists. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the code would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
outputDir = os.path.join(scriptPath,"ScratchAPD")
if not os.path.exists(outputDir):
&amp;nbsp;&amp;nbsp;&amp;nbsp; os.mkdir(outputDir)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-script-project-data-source-broken/m-p/167554#M6640</guid>
      <dc:creator>GregYetman</dc:creator>
      <dc:date>2021-12-11T08:44:04Z</dc:date>
    </item>
  </channel>
</rss>

