laptop and a wrench

Error

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

Última publicación: September 14, 2020 ArcGIS Pro
Número de ID del error BUG-000133395
EnviadoAugust 27, 2020
Última modificaciónJuly 11, 2025
Relacionado conArcGIS Pro
Versión encontrada2.6
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
Versión corregida2.7
EstadoFixed

Solución alternativa

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

Pasos para reproducir

ID del error: BUG-000133395

Software:

  • ArcGIS Pro

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga