Select to view content in your preferred language

ARCMAP 10.5 Python Script Error

01-15-2020 11:50 PM
New Contributor

I have successfully created the following code which is running fine on my system (Arcmap 10.5)


This code is running fine on my system but giving following error on some other system,


Executing: script "G:\image\s.img" "G:\river_splitted" "G:\output"
Start Time: Tue Jan 07 09:40:43 2020
Running script script...
Failed script script...

Traceback (most recent call last):
File "E:\", line 53, in <module>, DEM + " elevation", "NONE")
File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\geoprocessing\", line 510, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool

Failed to execute (script).
Failed at Tue Jan 07 09:40:45 2020 (Elapsed Time: 2.11 seconds)

Tags (2)
0 Kudos
4 Replies
MVP Emeritus
New Contributor

There is no syntax highlighter option available in the text editor, I am using the google chrome. Thats why I have pasted the code on a link, you can check it out at 

0 Kudos
MVP Emeritus
SC = arcpy.SearchCursor(min_elevation)
field_name = 'MIN_elevation'
for row in SC:                        

    # Process: Raster Calculator*float(value)‍‍‍‍‍
.... the rest

line 53 is the blank link, (line 5 above)

Copy your code and use the syntax highlighting in my link. since the row error number doesn't match


MVP Emeritus

In addition to Dan's thread, there are others explaining the use the syntax highlighter; it's a function of geonet, not your browser:

Posting code with Syntax Highlighting on GeoNet 

That should just about do it....