Select to view content in your preferred language

Overwrite service in folder using python

3719
1
04-10-2015 01:24 PM
KendellRyan
Occasional Contributor

I recently started using the tools here Updating your hosted feature service for 10.2 | ArcGIS Blog in order to automate updating services.

Is it possible (and if so what is the syntax) to overwrite a service that is in a folder?  I am familiar with the issue prior to 10.2.1 where that was not possible. I see where one person responded to the blog that they were getting errors trying to reference a folder name in the setup.ini file but I couldn't find any other mention of the issue in the forums or in the blogs to know if there is a workaround.

Thanks.

0 Kudos
1 Reply
JamesCrandall
MVP Frequent Contributor

The problem I am running into is in generating the .sd file prior to the upload.

You will have to download the source code (update.py), the config file (settings.ini) and update this file with your specific parameters and finally you will need to install the "requests" python library.  The issue with the settings.ini could be something simple (like not placing quotes around the parameter values), or you can just modify the source python code to use an alternative parameter source (like a geoprocessor tool).  We intend to do the later because it's just a bad idea to place hardcoded login credentials in an .ini file and will run that thru the new Hidden String parameter of a toolbox.

I've still been stumped “ERROR 001270: Consolidating the data failed” error.