laptop and a wrench

Bug

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.”

Zuletzt veröffentlicht: September 14, 2020 ArcGIS Pro
Bug-ID-Nummer BUG-000133395
EingereichtAugust 27, 2020
Zuletzt geändertJuly 11, 2025
Gilt fürArcGIS Pro
Gefunden in Version2.6
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
Behoben in Version2.7
StatusFixed

Workaround

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")

Schritte zur Reproduzierung

Bug-ID: BUG-000133395

Software:

  • ArcGIS Pro

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln