laptop and a wrench

Error

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

Última publicación: August 25, 2014 No Product Found
Número de ID del error NIM006126
EnviadoJanuary 17, 2007
Última modificaciónApril 2, 2025
Relacionado conNo Product Found
Versión encontrada9.2
EstadoWill Not Be Addressed

Información adicional

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.

Solución alternativa

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", "") #~~~~~~~~

Pasos para reproducir

ID del error: NIM006126

Software:

  • No Product Found

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