Select to view content in your preferred language

RuntimeError: Object: Error in executing tool

7927
7
Jump to solution
07-26-2019 01:50 PM
TonyDaSilva1
Regular Contributor

I ran the Clip Raster tool in ArcGIS Pro and then I tested running it directly from the 'copy python command'

arcpy.management.Clip(r"E:\\Data\\LiDAR.gdb\\cdem_regional_dem", "32852.3960004291 5546820.25821128 117295.398192037 5609499.40718372", r"E:\\Data\\Output.gdb\DEM_Extent", r"E:\\Data\\BaseData.gdb\\processing_area", "32767", "ClippingGeometry", "NO_MAINTAIN_EXTENT")

ArcGIS Pro worked but running it from the python interpreter directly always yields the following error.

RuntimeError: Object: Error in executing tool

Running the command from within ArcGIS Pro Works, but running it outside of ArcGIS Pro is throwing an error. There is not really anything in the Python Environment that should be creating a difference. I write and run Python fairly often and nothing has changed recently. So I cant figure out why this is happening.

Heres the full output from the command line:

arcpy.management.Clip(r"E:\\Data\\LiDAR.gdb\\cdem_regional_dem", "32852.3960004291 5546820.25821128 117295.398192037 5609499.40718372", r"E:\\Data\\Output.gdb\DEM_Extent", r"E:\\Data\\BaseData.gdb\\processing_area", "32767", "ClippingGeometry", "NO_MAINTAIN_EXTENT")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 16854, in Clip
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 16851, in Clip
retval = convertArcObjectToPythonObject(gp.Clip_management(*gp_fixargs((in_raster, rectangle, out_raster, in_template_dataset, nodata_value, clipping_geometry, maintain_clipping_extent), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool

Tags (2)
1 Solution

Accepted Solutions
MikePianka
Emerging Contributor

We nailed down the issue as a conflict between AutoCAD’s River and Flood module with ArcGIS Pro. After uninstalling that AutoCAD module we no longer have this issue on our workstations.

View solution in original post

7 Replies
MikePianka
Emerging Contributor

We are experiencing the same exact problem on some workstations. arcpy tools fail in IDLE with that error but work fine in Pro.

0 Kudos
ColinConstance
Emerging Contributor

I've been working through the 'update real-time data' example on :Update Real-Time Data with Python | Learn ArcGIS and have run into the same problem. The first tool the script accesses is arcpy.management.CreateFileGDB and that gives a runtime error "RuntimeError: Object: Error in executing tool" but it works within ArcGIS Pro.

Initially I thought it was something to do with my setup as I've had problems with ArcGIS Pro licensing, so it is good to know I'm not alone.

0 Kudos
TonyDaSilva1
Regular Contributor

Even with a fresh install, the problem still persists.

arcpy 2.7 does works however.

I am curious, do anyof you have other programs installed (AutoCAD, Visual Studio, MondgoDB, etc) I am starting to think that there is a seperate program entirely that is causing the problem, but I don't want to start uninstalling everything

0 Kudos
MikePianka
Emerging Contributor

We nailed down the issue as a conflict between AutoCAD’s River and Flood module with ArcGIS Pro. After uninstalling that AutoCAD module we no longer have this issue on our workstations.

TonyDaSilva1
Regular Contributor

As soon as I uninstalled those modules everything started working. Much appreciated.

0 Kudos
IanGrasshoff1
New Contributor

Thanks so much Mike!  I have been struggling with this issue off and on for months.  I didn't even know I had the 'AutoCAD River and Flood module' installed...but remoing it fixed my issue!  I came across several other arcpy modules that were affected..things like Rename etc.

How did you track the issue back to the River and Flood module?

0 Kudos
MandyTwitchell
Emerging Contributor

Hi Mike, I am having the exact issue as the others, with my RuntmeError, how do I uninstall the AutoCAD module? Will that screw anything else up? I'm trying to use UpdateCursors for tables in ArcPro, I'm also using PyCharm as my IDE I don't know if that's part of the problem? This is my error:

Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\IPython\core\interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-2ed560f24b57>", line 1, in <module>
runfile('C:/Users/ocean/geog562/Twitchell_Addfields.py', wdir='C:/Users/ocean/geog562')
File "C:\Users\ocean\Desktop\PyCharm Community Edition 2020.3.5\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Users\ocean\Desktop\PyCharm Community Edition 2020.3.5\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/ocean/geog562/Twitchell_Addfields.py", line 11, in <module>
arcpy.AddField_management('huc4', ["Area" , 'DOUBLE'])
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4337, in AddField
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4334, in AddField
retval = convertArcObjectToPythonObject(gp.AddField_management(*gp_fixargs((in_table, field_name, field_type, field_precision, field_scale, field_length, field_alias, field_is_nullable, field_is_required, field_domain), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool

0 Kudos