laptop and a wrench

Erro

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 Publicação: September 14, 2020 ArcGIS Pro
Número de ID do Erro BUG-000133395
EnviadoAugust 27, 2020
Última ModificaçãoJuly 11, 2025
Aplica-se àArcGIS Pro
Versão encontrada2.6
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão Fixa2.7
StatusFixed

Solução Provisória

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

Etapas para Reproduzir

ID do Erro: BUG-000133395

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download