<?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: GP Service run from python (secure) Issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505529#M39776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The link you have provided for the password example seems to be broken can you re paste it?&amp;nbsp; Not sure with the information but switching from http to https does require a different python class to link to.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000600000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000600000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;class urllib2.HTTPHandler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A class to handle opening of HTTP URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;class urllib2.HTTPSHandler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A class to handle opening of HTTPS URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/2/library/urllib2.html"&gt;http://docs.python.org/2/library/urllib2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But again not sure what you are using....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2013 15:48:46 GMT</pubDate>
    <dc:creator>LindseyWood</dc:creator>
    <dc:date>2013-07-02T15:48:46Z</dc:date>
    <item>
      <title>GP Service run from python (secure) Issue</title>
      <link>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505528#M39775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've setup a python script to a run a geoprocessing service e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00570000004w000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00570000004w000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All works well for unsecure service, but when securing the service, I can't get it to work. The syntax for the tool in python I use is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://server/arcgis/services;Tools/DataUpdate;user;password"&gt;http://server/arcgis/services;Tools/DataUpdate;user;password&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the error I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;DataUpdateFromZip_DataUpdate&amp;gt; not found&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Completed script DataUpload...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then if I switch back to unsecure service I still get that error, but if I publish it as an unsecure service and leave it that way it works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 01:49:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505528#M39775</guid>
      <dc:creator>ShaunWeston</dc:creator>
      <dc:date>2013-07-02T01:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: GP Service run from python (secure) Issue</title>
      <link>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505529#M39776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The link you have provided for the password example seems to be broken can you re paste it?&amp;nbsp; Not sure with the information but switching from http to https does require a different python class to link to.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000600000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000600000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;class urllib2.HTTPHandler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A class to handle opening of HTTP URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;class urllib2.HTTPSHandler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A class to handle opening of HTTPS URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/2/library/urllib2.html"&gt;http://docs.python.org/2/library/urllib2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But again not sure what you are using....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 15:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505529#M39776</guid>
      <dc:creator>LindseyWood</dc:creator>
      <dc:date>2013-07-02T15:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: GP Service run from python (secure) Issue</title>
      <link>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505530#M39777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Based on the syntax you posted, I assume you're trying to consume the GP service in the "arcpy" way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You're passing user/password via the ImportToolbox arcpy command?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on your comments it behaves differently depending on how you publish (secure vs non-secure), and the error - it sounds like your virtual directories might not be right? Which could be an HTTP vs HTTPS issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Taking Python out of it, can you make a connection in ArcMap to your secure server (with a USER connection), and consume the service and get back a result. It looks like your result is a Zip file, so you'll have to open the Results window, expand the execution and double click the output to open the Zip.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 17:19:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505530#M39777</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-07-02T17:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: GP Service run from python (secure) Issue</title>
      <link>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505531#M39778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Whoops I didn't see I got some replies. Thanks for the responses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes I'm trying to consume a GP service using arcpy and trying to add username/password to the ImportToolbox command, but it's not working, however it works fine for unsecure services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ImportToolbox("&lt;A href="http://gis.nrc.govt.nz/arcgis/services;Tools/DataUpdate" rel="nofollow noopener noreferrer" target="_blank"&gt;http://servername/arcgis/services;Tools/DataUpdate&lt;/A&gt;", "toolbox")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DataUpdateFromZip_toolbox("Existing")&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This doesn't...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ImportToolbox("&lt;A href="http://gis.nrc.govt.nz/arcgis/services;Tools/DataUpdate" rel="nofollow noopener noreferrer" target="_blank"&gt;http://servername/arcgis/services;Tools/DataUpdate&lt;/A&gt;&lt;A href="http://gis.nrc.govt.nz/arcgis/services;Tools/DataUpdate;" rel="nofollow noopener noreferrer" target="_blank"&gt;;&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt;username;password&lt;/SPAN&gt;", "toolbox")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DataUpdateFromZip_toolbox("Existing")&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Error - &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Courier New;"&gt;Object: Tool or environment &amp;lt;DataUpdateFromZip_DataUpdate&amp;gt; not found&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Yes I can execute the tool (secured) through ArcCatalog&lt;BR /&gt;&lt;BR /&gt;Yeah it might be something to do with http/https. I'm not sure exactly how that's meant to work. Https isn't enabled on this server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:10:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gp-service-run-from-python-secure-issue/m-p/505531#M39778</guid>
      <dc:creator>ShaunWeston</dc:creator>
      <dc:date>2021-12-11T22:10:47Z</dc:date>
    </item>
  </channel>
</rss>

