laptop and a wrench

Error

arcpy.LayerToKML fails with Error 999999 after being published as a geoprocessing service when the input is in JSON format.

ArcGIS GIS Server
Número de ID del error BUG-000168472
EnviadoJune 20, 2024
Última modificaciónNovember 11, 2024
Relacionado conArcGIS GIS Server
Versión encontrada11.3
Sistema operativoWindows Server
Versión de sistema operativo2022
EstadoAs Designed

Información adicional

This is expected behavior. The arcpy.LayerToKML function requires a layer as input (feature layer, raster layer, mosaic layer, group layer, or layer file) and not JSON. The workaround makes the JSON file a feature set, which meets the tool's requirements.

Solución alternativa

For script tools, replace the following line in the Python script:

input_feature_set = arcpy.GetParameter(0)

with the following:

try:

  input_feature_set = arcpy.FeatureSet(arcpy.GetParameter(0).JSON)

except:

  input_feature_set = arcpy.GetParameter(0)

Pasos para reproducir

ID del error: BUG-000168472

Software:

  • ArcGIS GIS Server

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga