不具合 ID 番号 |
BUG-000165850 |
送信されました | March 11, 2024 |
最終更新日 | June 5, 2024 |
適用対象 | ArcGIS Pro |
見つかったバージョン | 3.2.1 |
オペレーティング システム | Windows OS |
オペレーティング システムのバージョン | 10.0 64 Bit |
ステータス | As Designed
開発チームによる確認後に、この動作が設計どおりであると判断されました。 詳細については、「参考情報」セクションをご参照ください。
|
参考情報
This is not supported and is being marked as designed. When opening project 'x' and then, from that project, calling a script that opens project 'x' again via its path, it is the equivalent of opening the same project a second time. The second instance is read-only. This is reproducible in the UI without Python. Open project x, then open it again. The second instance title reads 'Project X [Read Only]'.
In the second instance, try adding a field and saving the changes. The same "Cannot get exclusive schema lock" error is returned. This may have worked in an earlier release of ArcGIS Pro, but around the 2.9 release, the application introduced the read-only lock. Arcpy.mp was extended to provide an isReadOnly property on the ArcGISProject object to enable confirming if a project can be saved.
The following note is in the ArcGISProject class help topic.
Note:
Projects can be referenced multiple times, but only the first reference can be saved directly because the other references will be opened as read-only. The ArcGISProject object has an isReadOnly property that can be used to determine a project's read state before calling a method such as saveACopy instead of save.
対処法
Declare a variable by hard coding the path to the feature class rather than using arcpy.mp to access the feature class.
再現の手順