Select to view content in your preferred language

Zonal statistic as table always error with 'The input path contains spaces'

274
3
12-11-2024 08:11 PM
ShuwenLiu
New Contributor

Zonal statistic as table always error with 'The input path contains spaces'. However, the 'Zonal statistic' using the exact setting could successful be run.

This the detail of 'Zonal Statistics as Table'

Zonal Statistics as Table
=====================
Tool Path

Input Raster or Feature Zone Data E:\research EMIT\EMIT ArcGIS\EMIT ArcGIS.gdb\EMIT_tiles
Zone Field OBJECTID
Input Value Raster ai_v3_yr.tif
Output Table E:\research EMIT\EMIT ArcGIS\EMIT ArcGIS.gdb\ZonalSt_EMIT_ti1
Ignore NoData in Calculations DATA
Statistics Type MEAN
Process as Multidimensional CURRENT_SLICE
Percentile Values 90
Percentile Interpolation Type AUTO_DETECT
Calculate Circular Statistics ARITHMETIC
Circular Wrap Value 360
Output Join Layer
=====================
Messages

Start Time: Wednesday, December 11, 2024 9:52:31 PM
ERROR 000622: Failed to execute (ZonalStatisticsAsTable). Parameters are not valid.
ERROR 010819: The input path contains spaces.
Failed to execute (ZonalStatisticsAsTable).
Failed at Wednesday, December 11, 2024 9:52:31 PM (Elapsed Time: 0.20 seconds)

 

 

This the detail of 'Zonal Statistics as'

Zonal Statistics
=====================
Tool Path

Input Raster or Feature Zone Data E:\research EMIT\EMIT ArcGIS\EMIT ArcGIS.gdb\EMIT_tiles
Zone Field OBJECTID
Input Value Raster ai_v3_yr.tif
Output Raster E:\research EMIT\EMIT ArcGIS\EMIT ArcGIS.gdb\ZonalSt_EMIT1
Statistics Type MEAN
Ignore NoData in Calculations DATA
Process as Multidimensional CURRENT_SLICE
Percentile Value 90
Percentile Interpolation Type AUTO_DETECT
Calculate Circular Statistics ARITHMETIC
Circular Wrap Value 360
=====================
Messages

Start Time: Wednesday, December 11, 2024 9:50:48 PM
Value raster being used as snap raster; this is new default behavior.
WARNING 010566: Some zones may not have been rasterized.
Succeeded at Wednesday, December 11, 2024 9:52:31 PM (Elapsed Time: 1 minutes 42 seconds)

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

E:\research EMIT\EMIT ArcGIS\EMIT ArcGIS.gdb\

try copying the gdb to a simpler folder name without spaces and report if an error occurs

You could also try specifying a folder as the destination and a *.dbf as the output type, since the output can either be a gdb table or a *.dbf file in a folder


... sort of retired...
0 Kudos
Jordenjames
New Contributor

The "Zonal Statistics as Table" tool in ArcGIS can sometimes throw an error if the file path contains spaces. To resolve this, try the following:

  1. Move the input files: Place your input data (both raster and shapefile) in a directory with no spaces in the file path.
  2. Rename files or folders: If the folder or file names contain spaces, rename them to remove spaces (e.g., "My Folder" to "MyFolder").
  3. Use short paths: Use short file paths (e.g., C:\Data\ instead of C:\My Data).

This should prevent the error from occurring.

DFarming
Emerging Contributor

It likely has nothing to do with the filepath, I've been running various Arc projects with a space in the filepath for the past 4-5 years.

Try and manually browse to the file to add it as an input. In random situations (like the one that got me to this thread) I have this error pop up if I'm dragging a layer from the project contents to an input field (or selecting in dropdown), if I instead use the browse button and select the layer in a .gdb it will work fine.