<?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: Trouble publishing a gp tool in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301350#M11617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a similar problem and tried this solution to no avail.&amp;nbsp; In my geoprocessing script I'm using an SDE connection that is on a Linux machine.&amp;nbsp; ArcMap accesses it through a network drive x: and it runs fine in ArcMap.&amp;nbsp; The service publishes to Linux with no errors but when I run it, it won't use the SDE connection, even though it is native to the server.&amp;nbsp; I look at the python script as I submitted it and the python script as it sits on the ArcGIS Server and this is what I see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featurepath = os.path.join('x:/ags101','Aquarius.event.sde')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureClass = os.path.join(featurepath,'location_new')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest_folder = 'x:/ags101/viewer'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Linux:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Esri start of added variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g_ESRI_variable_1 = u'x:/ags101'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g_ESRI_variable_2 = u'/home/ags101/viewer'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Esri end of added variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featurepath = os.path.join(g_ESRI_variable_1,'Aquarius.event.sde')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest_folder = g_ESRI_variable_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see, the first variable is still Windows format, but the second one translates correctly.&amp;nbsp; I've tried several variations of defining the SDE connection but the result is always similar, one variable translates correctly but the other one doesn't.&amp;nbsp; Can you give me any ideas about how to use the SDE connection?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jul 2013 14:15:08 GMT</pubDate>
    <dc:creator>JimDickerson</dc:creator>
    <dc:date>2013-07-17T14:15:08Z</dc:date>
    <item>
      <title>Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301346#M11613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a simple python script that accepts a feature class name and a list of object ids. the script makes an sde connection with a hard-coded sde file and then exports the chosen features to a shapefile and stamps that to disk.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The tool runs fine in my python ide. The tool runs fine in Arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i click on the results and select Share as GP service i select new service and am presented with the Service Editor dialog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i try to publish (or analyze) i get errors that my tool "contains broken project data source"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm actually getting 4 things in the Prepare are. one is High severity error with code 68 broken project data. The other 3 are high warnings with code 24032 datasource is not registered with server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why are there 3 warnings and an error?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have registered this data source with ags using ArcCatalog (both normally and as an ags managed data source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i click on the warnings I get the Data Stores dialog and i see my registered data store. I then click Validate All and get a check.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can do this for all 3 warnings and they are then listed as Re-Analyze. But when i analyze again they return!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i click on the sole error message my Task is removed from the Service Editor and I am brought to the General tab. Not sure what to do there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I missing something? How can I get this gp tool to publish?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 16:24:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301346#M11613</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2012-07-09T16:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301347#M11614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you havent seen this topic, give it a once over to see if anything stands out with what you're doing in your script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00570000007r000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00570000007r000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you email me your script? I'd like to see how you put it together and why the analyzer thinks you have project data that it cant find.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;khibma[@]esri.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 18:13:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301347#M11614</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2012-07-09T18:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool (error 00068, script contains broken data source)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301348#M11615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...
theOutageView = r"\\theServer\ArcGISServerResources\workingConnectionFile.sde\GIS.TableName"
arcpy.TableToTable_conversion(theOutageView, arcpy.env.scratchGDB, "theOutageViewTable")
...
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Script works great in python IDE and ArcMap.&amp;nbsp; Give the error 00068, Script contains broken project data source and the error 24032, Data source used by Script is not registered with the server and will be copied to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've hit this error while publishing my GP service after upgrading from 10.0 to 10.1.&amp;nbsp; Referencing this sde file has worked since 9.X and is now causing issues (as did in_memory as a workspace).&amp;nbsp; I am unable to mark this error as an exception.&amp;nbsp; Was there ever a resolution to this issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301348#M11615</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2021-12-11T14:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301349#M11616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah...we can get you around that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First...make sure you have sp1 installed. It fixed some script packaging problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Second... the 00068 error will give you what it is thats broken, by name in the analyzer window. What name is it? That'll most likely be a variable or "name" inside your script. If you do something like this to your name, it'll get around the 00068 problem (yeah, its a bit of a hack)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#original 
myVar = "something"

#new
import os
myVar = os.path.join("something")
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Third...while this isn't really helpful to you now, when 10.2 is released, we've fixed many more of these issues, and you shouldnt have to do this hack.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:27:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301349#M11616</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2021-12-11T14:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301350#M11617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a similar problem and tried this solution to no avail.&amp;nbsp; In my geoprocessing script I'm using an SDE connection that is on a Linux machine.&amp;nbsp; ArcMap accesses it through a network drive x: and it runs fine in ArcMap.&amp;nbsp; The service publishes to Linux with no errors but when I run it, it won't use the SDE connection, even though it is native to the server.&amp;nbsp; I look at the python script as I submitted it and the python script as it sits on the ArcGIS Server and this is what I see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featurepath = os.path.join('x:/ags101','Aquarius.event.sde')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureClass = os.path.join(featurepath,'location_new')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest_folder = 'x:/ags101/viewer'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Linux:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Esri start of added variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g_ESRI_variable_1 = u'x:/ags101'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g_ESRI_variable_2 = u'/home/ags101/viewer'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Esri end of added variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featurepath = os.path.join(g_ESRI_variable_1,'Aquarius.event.sde')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest_folder = g_ESRI_variable_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see, the first variable is still Windows format, but the second one translates correctly.&amp;nbsp; I've tried several variations of defining the SDE connection but the result is always similar, one variable translates correctly but the other one doesn't.&amp;nbsp; Can you give me any ideas about how to use the SDE connection?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 14:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301350#M11617</guid>
      <dc:creator>JimDickerson</dc:creator>
      <dc:date>2013-07-17T14:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301351#M11618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the same issue when using the download DDP example from the arcpy mapping team. &lt;A href="http://www.arcgis.com/home/item.html?id=3a525b986b774a3f9cbbd8daf2435852"&gt;http://www.arcgis.com/home/item.html?id=3a525b986b774a3f9cbbd8daf2435852&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what I am doing wrong here, I run the script, it works great then I share as a geoprocessing service and I get the broken link error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running 10.3 and using pyscripter 2.6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave McMillan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2015 00:52:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301351#M11618</guid>
      <dc:creator>DavidMcMillan1</dc:creator>
      <dc:date>2015-07-25T00:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble publishing a gp tool</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301352#M11619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;6 years later and in Pro I'm also getting the 00068 error. My script creates an intermediate table using the in_memory workspace:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateTable_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'in_memory'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'outTable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then the script does some things to populate the table, then copies the table. The in_memory/table triggers the "broken project data source" but &lt;STRONG&gt;the table is not a project data source. It's created by the script!!&amp;nbsp;&lt;/STRONG&gt;I save other intermediate outputs into the in_memory workspace as well, but these do not trigger the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? So far my attempts at a work around have failed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 17:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/trouble-publishing-a-gp-tool/m-p/301352#M11619</guid>
      <dc:creator>BrandonFlessner</dc:creator>
      <dc:date>2018-02-15T17:17:52Z</dc:date>
    </item>
  </channel>
</rss>

