Skip to main content
Improved formatting
Source Link
MAYANK SHARMA
  • 494
  • 1
  • 5
  • 11

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 forwardslashforward-slash ("/").

For example in your code:

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

must be replacereplaced 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"

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"

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 forward-slash ("/").

For example in your code:

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

must be replaced 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"
deleted 41 characters in body
Source Link
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"

Hope, this will resolve your issue.

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"

Hope, this will resolve your issue.

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"
Source Link
MAYANK SHARMA
  • 494
  • 1
  • 5
  • 11

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"

Hope, this will resolve your issue.