Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Update Python script to 10.0

$
0
0
I have a script that was written and worked very well in version 9.3.1. I have updated the script to work in version 10.0 but am getting an error:ERROR: Executing: CopyFeatures locations_Layer. However I also get the message "Step 5: New Civic Addresses Loaded Successfully)" before the error message. Is there something that I missed updating the script? Below is the portion of code where it is failing.



Code:

    # Process: Copy Features...
    arcpy.CopyFeatures_management("locations_Layer", Civic_Addresses, "", "0", "0", "0")   
    arcpy.AddMessage("Step 5: New Civic Addresses Loaded Successfully")

    # Update ST_TYPE_CD NULL fields with 999
    cur = arcpy.UpdateCursor(db + "\\Civic_Addresses","ST_TYPE_CD IS NULL")
    row = cur.next()
   
    while row:
        row.ST_TYPE_CD = 999
        cur.UpdateRow(row)
        row = cur.next()
    del row
    del cur
    print "Street Types with NULLS defined"


Thank you.

Viewing all articles
Browse latest Browse all 2485

Trending Articles