Hi!
I am writing a script to backup sde database feature classes to a gdb file database.
But I'm running into this error:
arcgisscripting.ExecuteError: ERROR 000210: Cannot create output <path>
Failed to execute (CopyFeatures).
The script writes one or two feature classes to the gdb file but then I get the error on the next feature class.
I have tried python 3.7, python 2.7 and python 2.7 32-bit but with the same problem.
Any tips on how to proceed?
def moveFc(fc, out_workspace):
out_featureclass = os.path.join(out_workspace, fc)
print('flyttar till: ' + out_featureclass)
arcpy.CopyFeatures_management(fc, out_featureclass)
Microsoft SQL Server, ArcGIS Enterprise 10.8.2
Solved! Go to Solution.
I contacted Esri support and they gave me som generic scripting tips, like to shorten the path. I moved the gdb file to c:\temp\ instead and now it works.
Hi,
In the error 000210 line it looks like the output path is missing most of the path that was printed, DATA\oldfeatureclasses\fc.gdb\ thus it is trying to write it directly into to the R:\Geodataarkiv folder. This is potentially due to single backslashes and depends on how out_workspace is defined, but I am not sure why it would work once, check out this post for examples and fixes Filenames and file paths in Python - Esri Community
Hope that helps.
Cheers, Graeme
I contacted Esri support and they gave me som generic scripting tips, like to shorten the path. I moved the gdb file to c:\temp\ instead and now it works.
I also got a tip from a collegue to alter the path from "R:\myfolder" to "\\compname.alingsas.local\path\myfolder" and that also worked.
The two paths points to the same folder but the unc network share path works fine in the script, while the same mapped drive letter path doesn't. I have no clue why.