I have a python script that creates a copy features and tables from a SDE database (around 400 files).

Every time I run it , I get a couple of "ERROR 000354: The name contains invalid characters" errors. Upon checking the error messages I see that it is putting a ".shp" on the "output feature class" parameters. Every time I run it, it would be a different feature class that get this error.

Anyone else who had experienced this behavior and solved it?