laptop and a wrench

Erro

A searchcursor will cause PythonWin and Idle to crash when used with Add Field in a File Geodatabase.

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM006126
EnviadoJanuary 17, 2007
Última ModificaçãoApril 2, 2025
Aplica-se àNo Product Found
Versão encontrada9.2
StatusWill Not Be Addressed

Informações Adicionais

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Solução Provisória

This sample stores all the OID's in a python list while in the cursor, and then accesses the list and adds the fields after the cursor has been put to bed.#~~~~~~~~rows = gp.searchcursor(fc)row = rows.next()OIDList = []while row: OIDList.append(row.OBJECTID) row = rows.next()del rowdel rows for OID in OIDList: gp.AddField_management(fc, "TK" + str(OID), "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") #~~~~~~~~

Etapas para Reproduzir

ID do Erro: NIM006126

Software:

  • No Product Found

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