laptop and a wrench

Bogue

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

Dernière publication: August 25, 2014 No Product Found
Numéro d’ID de bogue NIM006126
EnvoiJanuary 17, 2007
Dernière modificationApril 2, 2025
S’applique àNo Product Found
Version trouvée9.2
StatutWill Not Be Addressed

Informations supplémentaires

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.

Solution de contournement

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

Étapes pour reproduire

ID de bogue: NIM006126

Logiciel:

  • No Product Found

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement