laptop and a wrench

漏洞

When exporting and executing a Python script using the 'Calculate Field' tool in ArcGIS Pro, the following error message is returned, “SyntaxError: EOL while scanning string literal.”

上次发布: September 14, 2020 ArcGIS Pro
漏洞 ID 编号 BUG-000133395
已提交August 27, 2020
上次修改时间July 11, 2025
适用范围ArcGIS Pro
找到的版本2.6
操作系统Windows OS
操作系统版本10.0 64 Bit
修正版本2.7
状态Fixed

解决办法

The issue can be resolved by getting the second line of the tool, which is return value", “TEXT”) appended after the first line.

For example, instead of arcpy.management.CalculateField("World Continents", "CONTINENT", "test(!OBJECTID!)", "PYTHON3", r"def test(value):

return value", "TEXT") , the code lines must look like the following: arcpy.management.CalculateField("World Continents",

"CONTINENT", "test(!OBJECTID!)", "PYTHON3", r"def test(value):return value", "TEXT")

重现步骤

漏洞 ID: BUG-000133395

软件:

  • ArcGIS Pro

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项