laptop and a wrench

Bug

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

Zuletzt veröffentlicht: February 23, 2023 ArcGIS Pro
Bug-ID-Nummer BUG-000154997
EingereichtJanuary 10, 2023
Zuletzt geändertOctober 7, 2024
Gilt fürArcGIS Pro
Gefunden in Version3.0.3
BetriebssystemN/A
BetriebssystemversionN/A
StatusAs Designed

Zusätzliche Informationen

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.

Schritte zur Reproduzierung

Bug-ID: BUG-000154997

Software:

  • ArcGIS Pro

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln