POST
|
thanks for your help! here is what I did. 1. I tried inserting .reset statements where needed and removing redundant cursors. this didn't work. 2. I switched to deleting cursors and then re-establishing them. this still didn't work, but it got me thinking... 3. ultimately, I stuck with deleting and re-establishing cursors, but I also changed the name of each iterator. so, this is how the code ended up looking and working where I needed to loop through a single cursor twice:
finalElevRow = arcpy.SearchCursor("selectedFeatures_lyr", whereClause)
rowcount = 0
for thing in finalElevRow:
rowcount += 1
print "I found the following number of local elevation features with that value: "
print rowcount
del finalElevRow
finalElevRow = arcpy.SearchCursor("selectedFeatures_lyr", whereClause)
if rowcount == 1:
for glob in finalElevRow:
currentElevId = glob.ORIG_FID
print "This is the ID of the new summit feature: "
print currentElevId
else:
currentElevId = -9999
print "This is the ID of the new summit feature: "
print currentElevId
del finalElevRow I'm going to try it, but I think using .reset AND changing the name of the iterator might do the trick. thanks so much for your help! yrs- Evan!
... View more
09-27-2011
10:13 AM
|
0
|
0
|
296
|
POST
|
It's hard to tell what is actually happening, as pythonwin getting in the way... Try saving your file to the location of python.exe (typically C:\Python26\ArcGIS10.0\), then use command prompt to navigate there and run it with: python summits.py This will (probably) still crash, but it ought to at least give you a line number to work from. Otherwise it will crash the whole command window, which leaves us where we are at the moment, but with a few possibilities eliminated... Let me know how you get on! same thing happened - same error window and everything. yrs- Evan!
... View more
09-26-2011
06:10 AM
|
0
|
0
|
296
|
POST
|
so... I have a relatively simple script I wrote that does what it's supposed to do, but, after processing ~20 features, pythonwin dies and generates the following details: Description: Stopped working Problem signature: Problem Event Name: APPCRASH Application Name: pythonw.exe Application Version: 0.0.0.0 Application Timestamp: 4ba3e4e2 Fault Module Name: FileGDB.dll Fault Module Version: 10.0.0.2414 Fault Module Timestamp: 4bf445c7 Exception Code: c0000005 Exception Offset: 0006a45f OS Version: 6.1.7601.2.1.0.272.7 Locale ID: 1033 I have no idea why this is happening. Google searches and forum searches have produced nothing. This is almost certainly not a permissions issue as I am running the script as an administrator and all data is local. besides, it runs through part of the data. I've attached the script. any help would be GREATLY appreciated! yrs- Evan!
... View more
09-23-2011
06:14 AM
|
0
|
5
|
533
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|