laptop and a wrench

Erro

The query_domains method from the FeatureLayerCollection class returns an error message, "The requested layer (layerId: queryDomains) was not found. (Error Code: 400)".

Última Publicação: November 13, 2020 ArcGIS API for Python
Número de ID do Erro BUG-000134934
EnviadoOctober 27, 2020
Última ModificaçãoJune 27, 2025
Aplica-se àArcGIS API for Python
Versão encontrada1.8.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão Fixa2.0
StatusFixed

Solução Provisória

Use the following script suggested in GitHub, refer to the following link, https://github.com/Esri/arcgis-python-api/issues/485#issuecomment-568037339

from arcgis.gis import GIS

gis = GIS("home")

def process_layers_or_tables(layer_or_table):

  print(f'{layer_or_table.properties.name}: {layer_or_table.url}')

  for field in layer_or_table.properties.fields:

    print(f'\t{field.name} - {field.alias} - {field.type}')

    if 'domain' in field and field.domain is not None:

      print(f'\t\tDomain associated with field')

      if field.domain.type == 'codedValue':

        for coded_value in field.domain.codedValues:

          print(f'\t\t\t{coded_value.name}')

      else:

        print(f'Not coded value domain: {field.domain}')

feature_layer = gis.content.get("7791c2d03a214eb8a767c9e58d2275a2")

for layer in feature_layer.layers:

  process_layers_or_tables(layer)

for table in feature_layer.tables:

  process_layers_or_tables(table)

Etapas para Reproduzir

ID do Erro: BUG-000134934

Software:

  • ArcGIS API for Python

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