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 to run a clip tool to clip the raster 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.
When I run the code, I am receiving "Authentication token required" error message. I tried to rewrite the code to pass in the portal item but I am still getting the same error message.
If anyone has any idea or work around to fix the issue then please let me know. Thank you!!
Code :
Error Message :
Hello,
just in case you would need to return to your code - I think, you must use Make Image Server Layer tool (https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-image-server-layer.htm) at first and then use the temporary layer in the analysis.