ARCMAP 10.5 Python Script Error

1247
4
01-15-2020 11:50 PM
MudassarAli2
New Contributor

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

https://onlinegdb.com/SkvkqiWeU

 

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:\script.py", line 53, in <module>
arcpy.gp.ExtractMultiValuesToPoints_sa(point_feature, DEM + " elevation", "NONE")
File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\geoprocessing\_base.py", 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
DanPatterson_Retired
MVP Emeritus
MudassarAli2
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 https://www.onlinegdb.com/SkvkqiWeU 

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

    # Process: Raster Calculator
rastercalc=arcpy.sa.Raster(constant_raster_)*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

ExtractMultiValuesToPoints_sa  

JoeBorgione
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 

https://community.esri.com/thread/245173-error-999999-in-arcpy-after-arcgis-pro-crashes 

That should just about do it....