laptop and a wrench

Error

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

Última publicación: February 23, 2023 ArcGIS Pro
Número de ID del error BUG-000154997
EnviadoJanuary 10, 2023
Última modificaciónOctober 7, 2024
Relacionado conArcGIS Pro
Versión encontrada3.0.3
Sistema operativoN/A
Versión de sistema operativoN/A
EstadoAs Designed

Información adicional

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.

Pasos para reproducir

ID del error: BUG-000154997

Software:

  • ArcGIS Pro

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