Invalid value for Index Name

4158
3
10-12-2011 10:50 AM
FrankLahm_III
New Contributor
I continue to get this error when adding an Index for some geodatabase tables within a python script:
[INDENT]ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000192: Invalid value for Index Name
Failed to execute (AddIndex).
[/INDENT]The names for the indexes seem to match all the requirements (16 characters or less, not starting with a number and no spaces). So what am I missing??
This error happens inconsistently. Meaning, it will create the index for one of the table views and move on to bomb at the next add index. Then I "fix" that index name, rerun and it will bomb at the previous index. However, the script is running these processes on table views, so it should not be an overwrite issue.

Attached is a sample of the line of code that is bombing.

Thanks.
-frank
Tags (2)
0 Kudos
3 Replies
MathewCoyle
Frequent Contributor
Don't quote me on this, but I seem to recall the add index gives this error if there is already an index with that name, or the field you are indexing is already indexed.
0 Kudos
DylanKennard
New Contributor III

I run a python script from SQL Agent that deletes and rebuilds a layer so I subsequently add the indexes back on.  It failed on a process after the index, so I started the script from the beginning as I had no legible error code.  Thus it failed this time on the index rebuild.  I reordered a bit of the python script and made the index part it's own module which is run last.  Therefore if it fails I don't have to trouble shoot that aspect.

0 Kudos
FrankLahm_III
New Contributor
Thanks Mathew,
The index names should all be unique; however, I have not check to see if the script is indexing the same fields repeatedly.  I will check that out next.
Thanks for the speedy response.
-f
0 Kudos