laptop and a wrench

漏洞

When a Python script for a GP Tool is published from ArcGIS Pro to ArcGIS Enterprise, some paths are converted into alternative variables. These can cause the scripts or tools to fail with syntax errors.

Portal for ArcGIS
漏洞 ID 编号 BUG-000156284
已提交March 3, 2023
上次修改时间January 27, 2025
适用范围Portal for ArcGIS
找到的版本10.9.1
操作系统Windows OS
操作系统版本10.0
状态As Designed

附加信息

These variables are expected to replace relative paths in python when published to ArcGIS Server.

解决办法

Limited success has been achieved in some scripts by writing paths differently. For example:

path = "\\Test$_TableToExcel.xlsx"

Output_Excel_File = cwd + os.path.join(path)

In this approach, a new variable for the network path is created, and os.path.join is used with the variable instead of directly typing the network path. This method resolves the syntax errors.

重现步骤

漏洞 ID: BUG-000156284

软件:

  • Portal for ArcGIS

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项