giving a constant inside greater than function

461
2
Jump to solution
01-29-2022 08:56 PM
abhisa
by
New Contributor

threshold=arcpy.GetParameterAsText(2)

stream=GreaterThanEqual(facc_clip,threshold)

Error: Input Raster: Dataset 570416 does not exist or is not supported 

Here 570416 is the value I input in the script tool, why is this error happening, I can replace threshold with 570416 and it works, but I want each time this to be an user input

PLEASE HELP

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

getparameterastext  returns text.... you want a number, hence you have to convert it to a number

threshold = int(threshold)


... sort of retired...

View solution in original post

2 Replies
DanPatterson
MVP Esteemed Contributor

getparameterastext  returns text.... you want a number, hence you have to convert it to a number

threshold = int(threshold)


... sort of retired...
abhisa
by
New Contributor

yes, now from a code snippet i used 

threshold = float(threshold)

and it worked, Thanks I am new to this arcpy and python, thanks for your help DanPatterson 😞