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.