ERROR 002901-SHARING RELATED ERROR DURING GEOPROCESING Python automate for mosaic image service

807
5
10-19-2022 02:36 AM
Labels (3)
geeblr
by
New Contributor II

Hello all

I am using ArcGIS pro 2.8 and arcgis portal 10.9.

I am trying to automate the process of publishing mosaic image services using python(Arcpy). I followed the ESRI documentation (publish an image )  and found out that

  • arceditor is not importing showing depreciated
  • arcpy.mapping.analyzeforsd is not found in python 3 i.e present in arcgis pro 2.8(although in documentation showing its even for the latest version)

So i skipped this step and followed the next steps i.e. stage service and upload service definition. stage service is successful but in upload service definition getting an ERROR 002901- SHARING RELATED ERROR DURING GEOPROCESSING (UNABLE TO CHECK IF SERVICE EXIST.(nameofservice))

0 Kudos
5 Replies
geeblr
by
New Contributor II
  1. Can anyone give proper resolution for publishing image services using python arcpy from ArcGIS pro.
  2. Is there any other arcpy function to upload the service definition file and publish it.

or else

  1. is there any way to access the image service URL through arcpy and edit the contents in the service.
0 Kudos
MaxBöcke
New Contributor III

Hey @geeblr 

it's a bit tricky and we had a lot of effort to this case. It already starts with the correct input format. In our workflow we take netCDF... What is yours?

@RehanChaudhary  can you help further?

0 Kudos
RehanChaudhary
Occasional Contributor

@geeblr The call to upload service definition has changed. Please refer to this documentation for how to use the method correctly: https://pro.arcgis.com/en/pro-app/latest/tool-reference/server/upload-service-definition.htm

I have seen the code snippet you have linked. The workflow is still pretty much the same but some the methods have become deprecated as i assume it was never updated so please refer to arcgis pro documentations for latest methods. hope it helps!

0 Kudos
geeblr
by
New Contributor II

Hello @RehanChaudhary i too had followed the code from arcgis pro documentation . 

Still the error is same.

this time i tried to change the ags file of portal version 10.9

i am getting

  • error 999999: something unexpected caused the tool to fail.
  • error: code:404 could not find resource or operation name.imageserver on the system. No resource could be found at that address.

 

@MaxBöcke @RehanChaudhary 

can you please share the complete code that has worked for you.

0 Kudos