laptop and a wrench

不具合

Running saveAsXML in a custom script tool and setting the input parameter with spaces in the file path in ArcGIS Pro returns an empty XML (extensible markup language).

最後に公開された状態: December 7, 2021 ArcGIS Pro
不具合 ID 番号 BUG-000143783
送信されましたOctober 19, 2021
最終更新日June 23, 2025
適用対象ArcGIS Pro
見つかったバージョン2.8
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0 64 Bit
ステータスNon-Reproducible

参考情報

There is an error in the custom script on line 90. Change the following line: inMeta = arcpy.metadata.Metadata( item ) As illustrated here: inMeta = arcpy.metadata.Metadata( item.replace("'", "") ) This change is required to remove single quotation marks from the path that is included in the path returned by the operating system when the item's name includes a space. To access the item's metadata, a path must be provided that does not include single quotation marks. This same technique is used elsewhere in the same script to resolve the same problem when getting the feature class name from the path. However, the same technique needs to be applied on the above line as well to remove single quotation marks from the full path of the item that was provided via the input parameter in order to access the item's metadata. The notes provided under the Additional Information heading prove that there is no problem using the SaveAsXML method when the input item's path includes spaces because it was noted that in other scenarios the script will generate FULL XML output 'even though the input is from a file path with space.' The SaveAsXML method can't work with a space in one scenario and not work with a space in another scenario. Therefore, the problem has to be user error with the provided script

再現の手順

不具合 ID: BUG-000143783

ソフトウェア:

  • ArcGIS Pro

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

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

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

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

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

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

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