Skip to main content
2 of 3
deleted 41 characters in body
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

As the error shows "Nonetype", it means that your variable "inraster" is empty. It is because of the incorrect way of writing the folder paths in your code. The variables where you are setting the workspace and other paths, should be written with either double backslash ("\") or single forwardslash ("/").

For example in your code:

env.workspace = "K:\1400-10-20"
outws="K:\1400-10-20\m"

must be replace with

 env.workspace = "K:/1400-10-20"
 outws="K:/1400-10-20/m"

or

env.workspace = "K:\\1400-10-20"
outws="K:\\1400-10-20\\m"
MAYANK SHARMA
  • 494
  • 1
  • 5
  • 11