I'm processing a large amount of data, and in the process I use the copyrows function to create a new table. I do validate the table name before doing so.
Nevertheless, it comes up with the "could not output" error every once in awhile. I've modified my program to just keep going and keep a list of the ones that failed.
The only thing I can see in common is that all the tables it failed to create have names and paths on the longer side. Is this a limitation that exists in the function?
One thing that could be happening here is that the ValidateTableName is creating duplicate table names. It doesn't check that its output is unique.
What's the output workstation type? Can you provide a list of table names that failed?
I had some time to do some additional testing this morning. The table names are definitely all unique so that was not the problem.
i took all the failed table names and deleted characters off the end until they were 32 characters in length, and now it works. It's strange to me that this is the case, as none of the other table-creating functions seem to be limited in this way. I'm on 10.2.2 by the way.
Hope is coming in python 3.6 for paths that exceed 260 characters
Under 'windows improvements'....
python.exe
andpythonw.exe
have been marked as long-path aware, which means that the 260 character path limit may no longer apply. See removing the MAX_PATH limitation for details.
But for security purposes, you will be required to provide the first 130 characters and the last 9
You are using ValidateTableName(), which is a good practice, but is there the chance there are duplicate table names invovled?
From Validating table and field names in Python—Help | ArcGIS Desktop :
The ValidateTableName function does not determine that the specified name is unique to the specified workspace. The Exists function can check to see whether the table name is unique for a given workspace.