laptop and a wrench

不具合

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
不具合 ID 番号 BUG-000179061
送信されましたAugust 27, 2025
最終更新日September 11, 2025
適用対象ArcGIS Pro
見つかったバージョン3.4.3
オペレーティング システムWindows OS
オペレーティング システムのバージョンN/A
ステータスKnown Limit

参考情報

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)

対処法

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)

再現の手順

不具合 ID: BUG-000179061

ソフトウェア:

  • ArcGIS Pro

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動