laptop and a wrench

不具合

An OSError occurs when instantiating a LayerFile object after changing the directory and not using the full path to the layer file (.lyrx) in ArcGIS Pro 3.0.

最後に公開された状態: October 1, 2022 ArcGIS Pro
不具合 ID 番号 BUG-000151539
送信されましたAugust 12, 2022
最終更新日February 7, 2025
適用対象ArcGIS Pro
見つかったバージョン3.0
オペレーティング システムN/A
オペレーティング システムのバージョンN/A
ステータスNon-Reproducible

参考情報

This issue is non-reproducible. Use the following modified script to join the newly changed directory so the LYRX can be found correctly: import os import arcpy print(f'Currently in {os.getcwd()}\n') fldr_scratch = os.path.join(os.getcwd(), 'fldr_scratch') os.chdir(fldr_scratch) print(f'Now in {os.getcwd()}\n') layer = arcpy.mp.LayerFile(os.path.join(fldr_scratch, 'Boundary.lyrx')) print(layer.filePath)

対処法

Use the full path to the layer file (.lyrx) as a string or by using the os.path.join() function.

再現の手順

不具合 ID: BUG-000151539

ソフトウェア:

  • ArcGIS Pro

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

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

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

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

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

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

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