laptop and a wrench

Erro

The ArcPy layer.labelClasses.expression method does not accept properly formatted strings if they contain multiple quotation marks.

Última Publicação: June 24, 2015 ArcGIS for Desktop
Número de ID do Erro BUG-000088225
EnviadoJune 9, 2015
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS for Desktop
Versão encontrada10.3.1
StatusWill Not Be Addressed

Informações Adicionais

This is a known behavior. The additional quotes are needed to make sure the Python window reads the field 'FID' and not a variable in a list.

Solução Provisória

The additional quotes are needed to properly form the string to be set as the expression. Without them it will not read 'FID' as a field. Instead, the method inteprates as the user is trying to use a variable in a list, because that is what that means in a Python interpreter. In the expression dialog, it does not expect the additional quotes because the Python parser understands that the brackets around a word indicate a field. Use triple quotes around the expression to maintain the full string: layer.labelClasses[0].expression = ''' "<CLR red='255'><FNT size = '17'>" + [OBJECTID] + "</FNT></CLR>" '''

Etapas para Reproduzir

ID do Erro: BUG-000088225

Software:

  • ArcGIS for Desktop

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