<?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: How to use a REST service in Python - DownloadRasters_management in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674411#M52160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried this code using a mosaic data set instead of the service URL.&amp;nbsp; All the rest of the string was the same, but it worked when using the MDS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that suggests that it has something to do with the URL to the REST service.&amp;nbsp; I think Dan has a good suggestion to flag&amp;nbsp;&lt;A href="https://community.esri.com/community/developers/web-developers/arcgis-rest-api"&gt;https://community.esri.com/community/developers/web-developers/arcgis-rest-api&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2018 19:43:07 GMT</pubDate>
    <dc:creator>BobBistrais</dc:creator>
    <dc:date>2018-05-31T19:43:07Z</dc:date>
    <item>
      <title>How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674403#M52152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a Python script with uses the DownloadRasters_management tool.&amp;nbsp; I want to use an Image Service from one of our servers as the input.&amp;nbsp; According to the documentation, the format is:&lt;/P&gt;&lt;P&gt;arcpy.DownloadRasters_management (in_image_service, out_folder, {where_clause}, {selection_feature}, {clipping}, {convert_rasters}, {format}, {compression_method}, {compression_quality}, {MAINTAIN_FOLDER})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for the in_image_service, I entered the URL to the service in quotes, e.g. "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyserver%2Fmyimageservice%2FImageServer" rel="nofollow" target="_blank"&gt;https://myserver/myimageservice/ImageServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-When I run the script, I get an error message "pythonw.exe has stopped working.&amp;nbsp; A problem caused the program to stop working correctly.&amp;nbsp; Please close the program".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-I also tried using the same URL to the service in ArcGIS Desktop, DownlaodRasters_management tool.&amp;nbsp; This gives me the message that the tool ran "successfully", but in fact, there is no output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how to properly format the URL to the service?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 17:34:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674403#M52152</guid>
      <dc:creator>BobBistrais</dc:creator>
      <dc:date>2018-05-31T17:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674404#M52153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bob, can you show the exact code you were using and not just the help file format string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 17:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674404#M52153</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T17:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674405#M52154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, here is the actual code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.DownloadRasters_management ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgistest.maine.gov%2Farcgis%2Frest%2Fservices%2FElevation%2FMaine_Elevation_DEM_Aggregate%2FImageServer" rel="nofollow" target="_blank"&gt;https://gistest.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_Aggregate/ImageServer&lt;/A&gt;&lt;SPAN&gt;", "C:/ImageDiscoveryNextGen/TempOutputs/imagedata0", '', "C:/ImageDiscoveryTest/SelectionGraphic.shp")&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 17:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674405#M52154</guid>
      <dc:creator>BobBistrais</dc:creator>
      <dc:date>2018-05-31T17:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674406#M52155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm. just make sure that&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;C:/ImageDiscoveryNextGen/TempOutputs/imagedata0&lt;/SPAN&gt; is a folder that actually exists.&lt;/P&gt;&lt;P&gt;Try to use "" rather than '' for unspecified parameters (shouldn't make a difference, until it does)&lt;/P&gt;&lt;P&gt;and the shapefile extent overlaps the inputs and is in the same coordinate system.&lt;/P&gt;&lt;P&gt;And you omitted the import arcpy, I presume for brevity&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 18:14:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674406#M52155</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T18:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674407#M52156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the import arcpy is at the top of the script, sorry I didn't paste that here but it is in the script.&amp;nbsp; The output file does exist, and I changed that single quoted blank to double quote.&amp;nbsp; And the SRS matches as well.&amp;nbsp; I also tried a different image service and got the same error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 18:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674407#M52156</guid>
      <dc:creator>BobBistrais</dc:creator>
      <dc:date>2018-05-31T18:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674408#M52157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you look at the examples in &lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/download-rasters.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/download-rasters.htm"&gt;Download Rasters—Data Management toolbox | ArcGIS Desktop&lt;/A&gt; , the service names all end with "?", so you might want to try appending a question mark at the end.&amp;nbsp; I also have some suspicions about your where clause.&amp;nbsp; I haven't worked with this tool before, but it could be an empty string generating a where clause that returns nothing.&amp;nbsp; Try leaving out the where clause and passing selection_feature as a named argument.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:28:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674408#M52157</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-31T19:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674409#M52158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Time to flag &lt;A href="https://community.esri.com/space/2132"&gt;ArcGIS REST API&lt;/A&gt;‌ since I am not sure it is a python issue since it can't perform, hence it fails&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674409#M52158</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T19:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674410#M52159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with and without the question mark, but no difference, also no luck with the where clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:39:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674410#M52159</guid>
      <dc:creator>BobBistrais</dc:creator>
      <dc:date>2018-05-31T19:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674411#M52160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried this code using a mosaic data set instead of the service URL.&amp;nbsp; All the rest of the string was the same, but it worked when using the MDS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that suggests that it has something to do with the URL to the REST service.&amp;nbsp; I think Dan has a good suggestion to flag&amp;nbsp;&lt;A href="https://community.esri.com/community/developers/web-developers/arcgis-rest-api"&gt;https://community.esri.com/community/developers/web-developers/arcgis-rest-api&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:43:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674411#M52160</guid>
      <dc:creator>BobBistrais</dc:creator>
      <dc:date>2018-05-31T19:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674412#M52161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since the Geoprocessing Tool is calling a web service, you could use Fiddler or a similar tool to profile the calls to the server and see what, if any, errors are being returned from the server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674412#M52161</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-31T19:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a REST service in Python - DownloadRasters_management</title>
      <link>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674413#M52162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #a9a9a9; background-color: #ffffff; font-weight: 500;"&gt;Hey &lt;A href="https://community.esri.com/migrated-users/17286"&gt;Bob Bistrais&lt;/A&gt;‌ &amp;amp;&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;‌&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe it could be authentication error because I am facing&amp;nbsp;similar kind of an issue and details are in this&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/237334-error-while-running-clip-tool-with-secured-image-service-as-input-in-python-arcgis-py3"&gt;post&lt;/A&gt;. If you guys had identified this issue earlier and resolved it, can you please let me know the&amp;nbsp;solution or any work around if it is available.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 16:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-use-a-rest-service-in-python/m-p/674413#M52162</guid>
      <dc:creator>PrasanthRamachandran2</dc:creator>
      <dc:date>2019-07-24T16:59:59Z</dc:date>
    </item>
  </channel>
</rss>

