laptop and a wrench

Bogue

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

Dernière publication: September 14, 2020 ArcGIS Pro
Numéro d’ID de bogue BUG-000133395
EnvoiAugust 27, 2020
Dernière modificationJuly 11, 2025
S’applique àArcGIS Pro
Version trouvée2.6
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
Version de correction2.7
StatutFixed

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000133395

Logiciel:

  • ArcGIS Pro

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement