I have a very strange issue: I try to execute the following script which uses TableSelect_analysis and construct as outputs the corresponding tables from another table depending on a specific attribute. For example I have 1000 rows with urban, rural and industrial areas and I want to output 3 files each with the corresponding kind of area.
for idx, description in enumerate(greeklishDescrList): description = description.replace(" ", "_") outSHP = outDir + description + u".shp" idxOriginal = descrList[idx] arcpy.TableSelect_analysis(r"C:\r*******d\R********l.gdb\l*********I.shp", outSHP, "\"descr\" = '" + idxOriginal + "'")
What happens is this:
In the first iteration of the for loop it does select all the rows with the correct value "descr".
Output name in the gdb is "shp" when it should have named it as I have coded elsewhere as RURAL.shp . In the contents of "shp" table everything is as expected.
In the next iteration it breaks down showing the following message:
ExecuteError: ERROR 000210: Cannot create output C:\r*********d\R********l.gdb\URBAN.shp Failed to execute (TableSelect).
Through the Python scripting environment of ArcGIS (I code through PyCharm) it also shows the following
- The path is correct. It is clear also from the fact that it constructes the problematic "shp.shp" table with -however- the correct values.
- There are permissions available for the same reason as (1)
- I have excluded the gdb and the whole directory from my Microsoft Security Essentials
- The files do not exist (I believe!). I delete them from the gdb through ArcGIS and I restarted everything multiple times
ArcGIS 10.3.1 with Python 2.7.8