laptop and a wrench

Erro

The getcwd() Python method returns the incorrect current working directory of a process when the project is launched from the Start menu.

Última Publicação: February 23, 2023 ArcGIS Pro
Número de ID do Erro BUG-000154997
EnviadoJanuary 10, 2023
Última ModificaçãoOctober 7, 2024
Aplica-se àArcGIS Pro
Versão encontrada3.0.3
Sistema OperacionalN/A
Versão do Sistema OperacionalN/A
StatusAs Designed

Informações Adicionais

When an application is launched either from the start menu or from the cmd.exe session, there is a well-established 'current directory' behavior. Python simply returns whatever the application's current directory is with os.getcwd().   iPython notebooks do not provide a way to determine the current running .ipynb, refer to the discussion at https://github.com/ipython/ipython/issues/10123 If the intent is to query the current ArcGIS Pro in which the Python code is running, use the 'arcpy.mp.ArcGISProject("CURRENT").homeFolde' command.

Etapas para Reproduzir

ID do Erro: BUG-000154997

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