It's not just adding fields that causes it... that was just one example. I'm running another script right now and the code that just triggered the same error again was the creation of a statistics table and it happened just after this line:arcpy.Statistics_analysis(x_view,mstr_tab,[["STR_NM_STD","FIRST"],["STR_NM_STD","LAST"],["COMMENTS","FIRST"]],"FULL_STR")
The variables and field names themselves are fairly irrelevant, but I would not expect the creation of a statistics table to cause an error associated with cursors.I also find it hard to believe that the arcpy.AddField command exists yet is unsuitable for it's express purpose. What bothers me the most though is, as I said before, these errors don't occur when running inside an IDE. This only happens when running inside of ArcMap as a tool.We're running on SP2. Can't try it on 10.1 yet because our admin hasn't installed it due to other incompatibility problems. It's not a new error... it has been happening for months and months, but it is so inconsistent that troubleshooting is difficult. I could run the same script 10x in a row, and maybe the error pops up in the same spot 3 times. Right now I'm just trying to see if anybody else has had the same problem and been able to pinpoint it's cause.