Select to view content in your preferred language

Why am I getting a 000210 "Cannot create output" error?

7870
6
Jump to solution
02-02-2022 07:10 PM
EricEagle
Frequent Contributor

When I do this in python:

 

 

p = arcpy.mp.ArcGISProject("CURRENT")
arcpy.env.workspace = p.defaultGeodatabase
d = p.defaultGeodatabase
arcpy.env.overwriteOutput = True

# abbreviating here - "inlyr" is a layer that has been gotten in a GetParameter() call

original_name = inlyr.name
utm_out_name = (original_name + '_UTM').replace(".","_")
utm_out = os.path.join(d, utm_out_name)

out_layer = arcpy.management.Project(inlyr, utm_out, arcpy.SpatialReference(32638))

 

 

this gives me:

 

 

Traceback (most recent call last):
  File "M:\Temp\arcstuff\utm.py", line 246, in <module>
    out_layer = arcpy.management.Project(inlyr, out_layer, arcpy.SpatialReference(32638))
  File "C:\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13216, in Project
    raise e
  File "C:\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 13213, in Project
    retval = convertArcObjectToPythonObject(gp.Project_management(*gp_fixargs((in_dataset, out_dataset, out_coor_system, transform_method, in_coor_system, preserve_shape, max_deviation, vertical), True)))
  File "C:\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 000210: Cannot create output M:\Temp\ArcGIS\Projects\MyProject\MyProject.gdb\osm_roads_UTM
Failed to execute (Project).

 

 

When I run Project() on the data directly, using the same exact parameters (not scripted), it also fails!

However, when I redirect the output to a shapefile in another directory (same NAS), it succeeds.

Why is this?  How do I get more specific information to figure out why it is refusing to write to the default project geodatabase?

I am able to create feature classes in the same .gdb (including via python) in the same session, so there is no permissions or lock issue that would seem to be at fault.

Version: ArcGIS Pro 2.9

UPDATE: the input layer is from a GeoPackage.  Not sure why that should matter, as it's an open/broadly compatible format.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
EricEagle
Frequent Contributor

From what I have been able to discern, Project() does not take GPKG layers as input.  Hopefully this changes in the future but at least as of early 2022 that's the situation.

View solution in original post

6 Replies
DanPatterson
MVP Esteemed Contributor

000210: Cannot create output <value>.—ArcGIS Pro | Documentation

The most common reasons are listed below

The output cannot be created. Potential reasons include data locking, an incorrect path, and limited access rights.

Solution
Confirm that the data is not locked by another user or application and that you have full rights to the workspace being used. Check to make sure that the path to the data is correct (check for typos in the folder path). Try creating the output in a new location.

Which would explain why you could create a shapefile.  It could for sure be a permissions thing or the fact that the file was in use by the geopackage


... sort of retired...
0 Kudos
EricEagle
Frequent Contributor

Thanks Dan, I did look up the 000210 documentation.

 

The output is not locked.

The path is not incorrect.

The access is not limited.

 

I can verify this by running other operations besides Project() and outputting it to the project geodatabase.

This feels like it's a bug.  I'll work through my customer account rep to get it submitted.

0 Kudos
mattkramer
Frequent Contributor

Hey Eric,

 

Was a solution ever reached on this? I have had a co-worker experience similar issues during a similar workflow, but only intermittently (running a Project() on multiple features to the same output location and having some complete before getting this error).

0 Kudos
EricEagle
Frequent Contributor

Matt, it turns out it's because it's a GeoPackage layer.  Apparently Project wants a feature class not a GPKG layer.  Hopefully this changes at some point since GPKG is becoming a very widely used format, but at least that's the answer as of today.

0 Kudos
DanPatterson
MVP Esteemed Contributor

good idea Eric... post here if you get a resolution


... sort of retired...
0 Kudos
EricEagle
Frequent Contributor

From what I have been able to discern, Project() does not take GPKG layers as input.  Hopefully this changes in the future but at least as of early 2022 that's the situation.