CopyFeatures - ERROR 000210: Cannot create output.

111
3
Jump to solution
08-17-2022 05:29 AM
ÅsaBlomberg
New Contributor II

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)

 

 

2022-08-18 10_17_09-Window.png

Microsoft SQL Server, ArcGIS Enterprise 10.8.2

0 Kudos
1 Solution

Accepted Solutions
ÅsaBlomberg
New Contributor II

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.

View solution in original post

0 Kudos
3 Replies
graeme_hill
New Contributor II

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

 

ÅsaBlomberg
New Contributor II

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.

0 Kudos
ÅsaBlomberg
New Contributor II

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.

0 Kudos