laptop and a wrench

Erro

Calling ArcPy StageService in ArcGIS Pro for a new layer returns the following error, "Selected layer does not contain a required layer type for web feature layer."

Última Publicação: May 14, 2020 ArcGIS Pro
Número de ID do Erro BUG-000130380
EnviadoApril 24, 2020
Última ModificaçãoFebruary 20, 2025
Aplica-se àArcGIS Pro
Versão encontrada2.5
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
StatusKnown Limit

Informações Adicionais

This issue is a technical limitation. The user has to save the .aprx file before trying to stage the service.

Solução Provisória

  1. Add a new layer.
  2. Before the ArcPy CreateWebLayerSDDraft or StageService methods are called in the code, save the project in the code (or manually in ArcGIS Pro).

Below is an example:

aprx.save() 

# Replace out_sddraft path, service name and folder name 

arcpy.mp.CreateWebLayerSDDraft(map_or_layers=selected_layer,

         out_sddraft='C:/.../mydraft.sddraft',

         service_name='MyServiceName',

         folder_name='MyFolder',

         overwrite_existing_service=True,

         copy_data_to_server=True,

         enable_editing=True,

         allow_exporting=True,

         enable_sync=True)

# Replace paths

arcpy.StageService_server('C:/.../mydraft.sddraft', 'C:/.../mydraftsd.sd', 5) 

Etapas para Reproduzir

ID do Erro: BUG-000130380

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download