I’m trying to use the ArcPy Python module to create a geodatabase to store information. I am currently running ArcPy in Visual Studio on a Windows 10 machine.
The function I am trying to use is:
arcpy.management.CreateFileGDB(out_folder_path, out_name, {out_version})
With following inputs defined as:
out_folder_path = 'C:/FILEPATH',
out_name = "geodatabase.gdb",
out_version = '10.0'
When I run the function I receive the following error
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 23214, in CreateFileGDB
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 23211, in CreateFileGDB
retval = convertArcObjectToPythonObject(gp.CreateFileGDB_management(*gp_fixargs((out_folder_path, out_name, out_version), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing_base.py", line 512, in
return lambda *args: val(*gp_fixargs(args, True)) RuntimeError: Object: Error in executing tool
PS C:\Users\USER
I have set up ArcPy on my PC in Visual Studio, I receive the following error upon running it which may be related however this does not seem to impact the module for other functions:
PS C:\Users\USER> conda activate arcgispro-py3 conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- conda activate arcgispro-py3
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException