<?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 Error while running clip tool with Secured Image service as input in python (arcgis-py3)  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-while-running-clip-tool-with-secured-image/m-p/448968#M35176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a python script to do a raster analysis on our assets with fire layer from living atlas with arcgis-py3 python models. As pat of this script, I have&amp;nbsp;to&amp;nbsp;run a clip tool to clip the raster&amp;nbsp; from Image service with area of interest layer and save the image (tif) file locally. Below is the code I wrote to clip the raster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When&amp;nbsp;I run the code, I am receiving "Authentication token required" error message. I tried to&amp;nbsp;rewrite the code to pass in the portal item&amp;nbsp;but I am still getting the same error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any idea or work around to fix the issue&amp;nbsp;then please let me know. Thank you!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;arcpy.Clip_management(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;in_raster&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"https://landscape10.arcgis.com/arcgis/rest/services/USA_Wildland_Fire_Potential/ImageServer"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;rectangle&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"-104.304669288 30.303921921 -94.3521542569999 35.3735805700001"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;out_raster&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Clipped_Fire_Potential_Raster, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;in_template_dataset&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Dissolved_Transmission_Lines, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;nodata_value&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"0"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;clipping_geometry&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NONE"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;maintain_clipping_extent&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_MAINTAIN_EXTENT"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Error Message :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Authentication Token Required Error Message" class="image-1 jive-image j-img-original" src="/legacyfs/online/454104_Authentication token required.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2019 21:21:22 GMT</pubDate>
    <dc:creator>PrasanthRamachandran2</dc:creator>
    <dc:date>2019-07-23T21:21:22Z</dc:date>
    <item>
      <title>Error while running clip tool with Secured Image service as input in python (arcgis-py3)</title>
      <link>https://community.esri.com/t5/python-questions/error-while-running-clip-tool-with-secured-image/m-p/448968#M35176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a python script to do a raster analysis on our assets with fire layer from living atlas with arcgis-py3 python models. As pat of this script, I have&amp;nbsp;to&amp;nbsp;run a clip tool to clip the raster&amp;nbsp; from Image service with area of interest layer and save the image (tif) file locally. Below is the code I wrote to clip the raster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When&amp;nbsp;I run the code, I am receiving "Authentication token required" error message. I tried to&amp;nbsp;rewrite the code to pass in the portal item&amp;nbsp;but I am still getting the same error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any idea or work around to fix the issue&amp;nbsp;then please let me know. Thank you!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;arcpy.Clip_management(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;in_raster&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"https://landscape10.arcgis.com/arcgis/rest/services/USA_Wildland_Fire_Potential/ImageServer"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;rectangle&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"-104.304669288 30.303921921 -94.3521542569999 35.3735805700001"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;out_raster&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Clipped_Fire_Potential_Raster, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;in_template_dataset&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Dissolved_Transmission_Lines, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;nodata_value&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"0"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;clipping_geometry&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NONE"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;maintain_clipping_extent&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_MAINTAIN_EXTENT"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Error Message :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Authentication Token Required Error Message" class="image-1 jive-image j-img-original" src="/legacyfs/online/454104_Authentication token required.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 21:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-while-running-clip-tool-with-secured-image/m-p/448968#M35176</guid>
      <dc:creator>PrasanthRamachandran2</dc:creator>
      <dc:date>2019-07-23T21:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running clip tool with Secured Image service as input in python (arcgis-py3)</title>
      <link>https://community.esri.com/t5/python-questions/error-while-running-clip-tool-with-secured-image/m-p/1067838#M61357</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;just in case you would need to return to your code - I think, you must use&amp;nbsp;Make Image Server Layer tool (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-image-server-layer.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-image-server-layer.htm&lt;/A&gt;) at first and then use the temporary layer in the analysis.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 11:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-while-running-clip-tool-with-secured-image/m-p/1067838#M61357</guid>
      <dc:creator>VHolubec</dc:creator>
      <dc:date>2021-06-14T11:19:53Z</dc:date>
    </item>
  </channel>
</rss>

