<?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 service analysis/publish errors, trying to copy &amp;quot;data&amp;quot; that isn't needed in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114790#M4464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to resolve the issue with some experimentation and further digging on GeoNet (though it doesn't appear many people have encountered this and posted up about it). A couple of threads led me to something that appears to be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="jive-link-thread-small" data-containerid="2046" data-containertype="14" data-objectid="158172" data-objecttype="1" href="https://community.esri.com/thread/158172"&gt;https://community.esri.com/thread/158172&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.stackexchange.com%2Fquestions%2F75138%2Fhow-to-publish-gp-service-with-importing-of-numpy-in-arcgis-for-server-10-1" rel="nofollow" target="_blank"&gt;https://gis.stackexchange.com/questions/75138/how-to-publish-gp-service-with-importing-of-numpy-in-arcgis-for-server-10-1&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first thread highlights a similiar issue with a GP service pre-publication analysis throwing a 00178 error. That thread referenced the second thread. Both identified an issue with how import statements were constructed in the python script. The solutions identified were to make more specific calls to individual functions, classes, etc., within the imported modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script tool, I was importing arcpy like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;import arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty standard, I would think. I replaced that line with specific imports to the modules in use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import env&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import GetParameterAsText, SetParameterAsText, GetParameterInfo&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import AddMessage, AddWarning, AddError&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import Raster, Describe, CreateUniqueName&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import Intersect_analysis, Statistics_analysis, Select_analysis, AddField_management, CalculateField_management&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import FeatureToRaster_conversion, RasterToPolygon_conversion, JSONToFeatures_conversion, FeaturesToJSON_conversion&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy.sa import Watershed, Con, IsNull, SetNull&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy.da import SearchCursor, UpdateCursor&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GP pre-publication analysis process worked quickly and as expected: no bizzare attempt to import system executables or source data from non-existent directories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import * &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...would have yielded the same result, but as this took several days for me to resolve I'm not inclined to try anything else.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hopefully someone else finds this useful. Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jun 2016 20:17:55 GMT</pubDate>
    <dc:creator>ChristianGass1</dc:creator>
    <dc:date>2016-06-13T20:17:55Z</dc:date>
    <item>
      <title>geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114782#M4456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to publish a geoprocessing tool (referenced as "Delineate Core" below) from ArcGIS Desktop 10.4.1 to ArcGIS Server 10.3 (for Windows) using the &lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/a-quick-tour-of-publishing-a-geoprocessing-service.htm"&gt;workflow described in the documentation&lt;/A&gt;​, and am running into some rather bizarre errors when &lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/analyzing-a-geoprocessing-service.htm"&gt;analyzing the service​&lt;/A&gt; that are keeping it from publishing. They are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1335px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="18" width="64"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;SEVERITY&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="64"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;STATUS&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="64"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;CODE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="901"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;DESCRIPTION&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="114"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;NAME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="64"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;TYPE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="64"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;DATA FRAME&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="18"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Error-High&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unresolved&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;178&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #e23d39;"&gt;Data: C:\Windows\bfsvc.exe, used by Script &lt;EM&gt;Delineate Core&lt;/EM&gt; cannot be copied to the server&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;delineate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Tool&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unknown&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="18"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Warning-High&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unresolved&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;24032&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #e23d39;"&gt;Data source used by Script &lt;EM&gt;Delineate Core&lt;/EM&gt; is not registered with the server and will be copied to the server: C:\dev\null&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;delineate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Tool&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unknown&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="18"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Warning-High&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unresolved&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;24032&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #e23d39;"&gt;Data source used by Script &lt;EM&gt;Delineate Core&lt;/EM&gt; is not registered with the server and will be copied to the server: C:\&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;delineate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Tool&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;Unknown&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm at a bit of a loss. &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;bfsvc.exe&lt;/EM&gt; &lt;/SPAN&gt;is a system executable (note that it is the first encountered alphabetically in the Windows install directory). I don't have a &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;"C:\dev\null"&lt;/EM&gt;&lt;/SPAN&gt; directory. And I'm not sure why it would be looking to copy my entire &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;"C:\"&lt;/EM&gt;&lt;/SPAN&gt; drive. None of these things are referenced in my geoprocessing tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The analysis process also takes about 15 minutes to run, which makes me think that something in either my script or the way that I'm publishing the service is causing the Analyze process to look all over the place for...what? I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A rundown of my geoprocessing tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The geoprocessing tool is a python script tool in an arctoolbox.&lt;/LI&gt;&lt;LI&gt;The script doesn't have any third-party python modules dependencies, only arcpy and a few modules from the standard library.&lt;/LI&gt;&lt;LI&gt;All 7 inputs are parameters (i.e., using &lt;SPAN style="color: #909090;"&gt;arcpy.GetParameterAsText(&lt;EM&gt;n&lt;/EM&gt;)&lt;/SPAN&gt;); none are hard-coded file paths, and the script contains no hard-coded file paths.&lt;/LI&gt;&lt;LI&gt;When I publish the tool, I set 5 of the inputs as constants, as the data comes from a file geodatabase (which is also registered with the ArcGIS Server).&lt;/LI&gt;&lt;LI&gt;There are 2 output parameters: one is a string, and one is a &lt;SPAN style="color: #909090;"&gt;json&lt;/SPAN&gt; file. Output parameters are set using &lt;SPAN style="color: #909090;"&gt;arcpy.SetParameterAsText(&lt;EM&gt;n&lt;/EM&gt;). &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;The arctoolbox and python script live in the same folder as the registered file geodatabase mentioned above: &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;"c:\ags".&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attempted a publication workflow with the tool located on my "D:\" drive. I didn't get error code 178, but still got references to a non-existent &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;"D:\dev\null" &lt;/EM&gt;&lt;SPAN style="color: #303030;"&gt;&lt;SPAN style="color: #505050;"&gt;location and the entire &lt;/SPAN&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;"D:\" &lt;/EM&gt;&lt;SPAN style="color: #505050;"&gt;drive, similar to the table above. I gave publishing a go in that case (why not, since no errors where holding it back), but the it hung up.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do I continue troubleshooting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114782#M4456</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-09T16:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114783#M4457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the tool that you are publishing available at 10.3 also? Usually you want to publish from a matching version of DT and Server to avoid any functionality issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:49:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114783#M4457</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2016-06-09T16:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114784#M4458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is - I originally wrote it using 10.3 desktop. That sounds as good a starting point as any though. I'll revert back to 10.3 and post up here the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 17:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114784#M4458</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-09T17:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114785#M4459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another thing to look into is how you construct paths within your script.&amp;nbsp; I suggest using the os module and os.path.join to create your directory paths for the script, as that can help to avoid the errors you're seeing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 20:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114785#M4459</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-06-09T20:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114786#M4460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For all scratch outputs I have a small shortcut function that relies on arcpy.CreateUniqueName and the scratchWorkspace environment variable to handle filenames and locations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt; color: #2873ee;"&gt;def so(temp_file_name, in_mem=False):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; """scratch output full path generator"""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if in_mem:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return arcpy.CreateUniqueName(temp_file_name, "in_memory")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return arcpy.CreateUniqueName(temp_file_name, arcpy.env.scratchWorkspace)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee; font-size: 10pt;"&gt;arcpy.env.scratchWorkspace = arcpy.env.scratchGDB&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scratch workspace is set to the scratch geodatabase. The issue also presented itself when I wrote to the &lt;EM&gt;in_memory &lt;/EM&gt;workspace, too.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try swapping out the guts of this function for one that uses the system path construction functions instead, and see if that makes a difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 14:33:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114786#M4460</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-10T14:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114787#M4461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I downgraded to 10.3 desktop -- clean uninstall, wiped the user data directories, etc. Basically a fresh, unencumbered install of ArcGIS Desktop (first time in a while, and frankly it needed it). Unfortunately the issue appeared, same as before. But at least I can rule out a version incompatibility issue, and any other potential funkiness that may have been introduced through my normal.mxt or my other customizations. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 14:38:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114787#M4461</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-10T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114788#M4462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm going back through the documentation to see if I missed anything critical. One thing I noticed &lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/authoring-geoprocessing-tasks-with-python-scripts.htm#ESRI_SECTION1_B8853E283B2B4FA6BCFDA27DB91980CE"&gt;here &lt;/A&gt;was this bit about how the script tool is scanned to discover any project data used in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;EM&gt;"When your script is scanned, every quoted string (either single- or double-quotes) used in a Python variable or as an argument to a function is tested to see if it is a path to data that exists."&lt;/EM&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a lot of quoted strings in my script: references to column names and field values; doc strings; info, warning, and error messages; parameters for arcpy tools (e.g,. &lt;SPAN style="font-family: courier new,courier; font-size: 10pt; color: #2873ee;"&gt;arcpy.conversion.RasterToPolygon(input, output, "SIMPLIFY")&lt;/SPAN&gt; ); and...some empty strings (used as placeholders in data objects for values to be written by another application).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this scanning process always happens, that might explain why Analyze takes 10-15 minutes to complete, and perhaps why the process treats &lt;SPAN style="color: #2873ee;"&gt;""&lt;/SPAN&gt; as a location that data needs to be added from. Could this explain the errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I maybe don't understand is that I've followed the convention for parameterizing inputs and outputs described &lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/authoring-geoprocessing-tasks-with-python-scripts.htm#ESRI_SECTION1_F7740934CF09444BB2AE571007F3FFEF"&gt;here&lt;/A&gt;. I think that is saying is that the script shouldn't be scanned if the inputs/outputs are all set as parameters, which I've done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unrelated to the above - what I've also noticed is that all the examples&lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/authoring-geoprocessing-tasks-with-python-scripts.htm"&gt; in the documentation&lt;/A&gt; use &lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;os.path&lt;/EM&gt; &lt;/SPAN&gt;functions to manually construct paths to data, rather than using &lt;SPAN style="color: #606060;"&gt;&lt;EM&gt;arcpy.CreateUniqueName()&lt;/EM&gt; &lt;/SPAN&gt;and/or the arcpy.env.scratchWorkspace variables to let ArcGIS sort it out. I will give that a go for my scratch data and see if that helps, as per my other comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any insight,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 15:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114788#M4462</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-10T15:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114789#M4463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, no luck with the approach of using &lt;EM&gt;os.path&lt;/EM&gt; functions to construct paths to scratch data. Same errors from Analyze as before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 17:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114789#M4463</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-10T17:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114790#M4464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to resolve the issue with some experimentation and further digging on GeoNet (though it doesn't appear many people have encountered this and posted up about it). A couple of threads led me to something that appears to be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A class="jive-link-thread-small" data-containerid="2046" data-containertype="14" data-objectid="158172" data-objecttype="1" href="https://community.esri.com/thread/158172"&gt;https://community.esri.com/thread/158172&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.stackexchange.com%2Fquestions%2F75138%2Fhow-to-publish-gp-service-with-importing-of-numpy-in-arcgis-for-server-10-1" rel="nofollow" target="_blank"&gt;https://gis.stackexchange.com/questions/75138/how-to-publish-gp-service-with-importing-of-numpy-in-arcgis-for-server-10-1&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first thread highlights a similiar issue with a GP service pre-publication analysis throwing a 00178 error. That thread referenced the second thread. Both identified an issue with how import statements were constructed in the python script. The solutions identified were to make more specific calls to individual functions, classes, etc., within the imported modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script tool, I was importing arcpy like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;import arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty standard, I would think. I replaced that line with specific imports to the modules in use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import env&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import GetParameterAsText, SetParameterAsText, GetParameterInfo&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import AddMessage, AddWarning, AddError&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import Raster, Describe, CreateUniqueName&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import Intersect_analysis, Statistics_analysis, Select_analysis, AddField_management, CalculateField_management&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import FeatureToRaster_conversion, RasterToPolygon_conversion, JSONToFeatures_conversion, FeaturesToJSON_conversion&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy.sa import Watershed, Con, IsNull, SetNull&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy.da import SearchCursor, UpdateCursor&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GP pre-publication analysis process worked quickly and as expected: no bizzare attempt to import system executables or source data from non-existent directories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; color: #2873ee;"&gt;from arcpy import * &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...would have yielded the same result, but as this took several days for me to resolve I'm not inclined to try anything else.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hopefully someone else finds this useful. Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 20:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114790#M4464</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2016-06-13T20:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114791#M4465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/35411"&gt;Christian Gass&lt;/A&gt;‌&amp;nbsp;Thanks a lot. I faced the same problem and your solution worked for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2018 12:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-analysis-publish-errors/m-p/114791#M4465</guid>
      <dc:creator>IbrahimKais</dc:creator>
      <dc:date>2018-11-21T12:04:34Z</dc:date>
    </item>
  </channel>
</rss>

