arcpy.Sort_management gets Error 00210 Cannot create output...

2016
1
02-18-2011 09:43 AM
JimMoore
New Contributor
I hope someone out there scan help me. I have a dbf file which I created using InsertCursor commands. From all that I can see the file is just fine. It is an address file of property owners within a certain buffer. I want to sort the records (usually not bigger than 200 records) by property owners so dulplicate owner records can be reduced. I have not been able to see another way of doing this besides using the Sort_management command:

arcpy.Sort_management(NotifPath+"11-TEST10-XX.dbf",NotifPath+"11-Sort10-XX.dbf",[["OWNERNAME","ASCENDING"]])

When I run the command in ArcMap 10.0 it seems to sorting, but then ends with:

Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000210: Cannot create output N:\IT\Products\Notifications\11-TEST08-XY.dbf Failed to execute (Sort).

I have tried many things to get it too work. arcpy.overwriteOutput is True. Sometimes I hve tried an output file named only "11-sort" and it still fails. I noticed an oddity as well. If "11-sort" exits before I run the command, the command fails again and the preexisting "11-sort" file have been deleted from my Windows NotifPath folder.

I have arcpy.env.workspace = NotifPath which is defined correctly as "N:\IT\Products\Notifications\" and use it regularly earlier inn the program.

So I'm at a loss to knnow what to do next. Can anybody help with this command or is there some otherway to sort a specific field in  dbf table?

Thanks for the help.
-Jim Moore
Tags (2)
0 Kudos
1 Reply
NiklasNorrthon
Occasional Contributor III
Lookup SearchCursor, and the fifth argument.
0 Kudos