laptop and a wrench

Bug

When using a valid Python script that references a *.style file published as a geoprocessing service in ArcGIS for Server 10.1, the script will fail with an error message that the *.style file reference in the script is missing or does not exist.

Last Published: August 25, 2014 ArcGIS for Server
Bug ID Number NIM083777
SubmittedAugust 14, 2012
Last ModifiedApril 2, 2025
Applies toArcGIS for Server
Version found10.1
StatusKnown Limit

Additional Information

must use a .serverStyle file with ArcGIS Server

Workaround

To make serverStyle files, you can use the utility at: "<a href="file:C:/Program" target="_blank">C:\Program</a> Files (x86)\ArcGIS\Desktop10.1\bin\MakeServerStyleSet.exe"You can use a .serverStyle file both in Desktop and ArcGIS Server. So the code in your script just uses a single file.Or, if you want to maintain 2 files (.style and .serverStyle) you can use the following bit of code which should work in both Desktop and Server, calling the most appropriate file. Keep in mind though, that this code wont consolidate and move both files during the publishing process and I'd suggest using data store to register the folder with the style files.if arcpy.ProductInfo() == 'ArcServer': ext = '.serverstyle'else: ext = '.style' stylefile = os.path.join(‘C:/temp’, "legend" + ext)ListStyleItems help topic: <a href="http://resources.arcgis.com/en/help/main/10.1/index.html#/ListStyleItems/00s300000074000000/" target="_blank">http://resources.arcgis.com/en/help/main/10.1/index.html#/ListStyleItems/00s300000074000000/</a>

Steps to Reproduce

Bug ID: NIM083777

Software:

  • ArcGIS for Server

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options