laptop and a wrench

Erro

The arcpy.env.workspace setting mistakenly references the active map layer instead of the target workspace parameter when the layer names match in ArcGIS Pro.

ArcGIS Pro
Número de ID do Erro BUG-000179061
EnviadoAugust 27, 2025
Última ModificaçãoSeptember 11, 2025
Aplica-se àArcGIS Pro
Versão encontrada3.4.3
Sistema OperacionalWindows OS
Versão do Sistema OperacionalN/A
StatusKnown Limit

Informações Adicionais

This behavior is as designed and is a known limitation. When passing only the name of a feature class to arcpy.Describe (and other functions or tools that accept a short name), it first looks for the feature class in the layers of the map. If no layer is found, it then searches in the arcpy.env.workspace. Many tools, functions, and user workflows are dependent on the software behaving this way. The documentation is updated to better represent this expected behavior. The best practice when writing scripts is to pass through the fully qualified path of the object to the function or tool. The path can be built from prior pieces of code: path = os.path.join(arcpy.env.workspace, ds, fc) arcpy.Describe(path)

Solução Provisória

Use best practices when writing scripts by passing through the fully qualified path of the object to the function or tool. The path can be built from prior pieces of code: path = os.path.join(arcpy.env.workspace, ds, fc) arcpy.Describe(path)

Etapas para Reproduzir

ID do Erro: BUG-000179061

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