I am trying to upload a GPKG file to ArcGIS Online. To convert, I am calling
```
sddraft_path = ROOT / 'output' / 'tmp.sddraft'
sd_path = ROOT / 'output' / 'tmp.sd'
gdb_path = ROOT / 'input' / 'myProject' / 'myProject.gdb'/'my_layer'
#this converst the Path to a string with double back slashes. This file resides on the hard drive.
path_to_geodatabase = f"{'%r'%str(gdb_path)}
FeatureClassToFeatureClass_conversion(path_to_gpkg, 'my_layer', path_to_geodatabase
```
This gives the error
```
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\conversion.py", line 3215, in FeatureClassToFeatureClass
retval = convertArcObjectToPythonObject(gp.FeatureClassToFeatureClass_conversion(*gp_fixargs((in_features, out_path, out_name, where_clause, field_mapping, config_keyword), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool
```
I tried running this on a python environment where I did conda install arcpy. I also did this by cloneing arcpy-base.
I am able to convert this file manually so there is nothing wrong with the GPKG.
It am stuck until I can get arcpy to work without erroring out with cryptic messages.