Grid Error - Syntax Error At Or Near Symbol Space
Early Adopter Program ArcGIS Ideas Esri Support Services ArcGIS Blogs ArcGIS Code Sharing Product Life Cycles Manage Cases Request Case Start Chat Back to results
Error 010267
Print Share Is This Content Helpful? Search on GeoNet Submit to syntax error in parsing grid expression arcgis ArcGIS Ideas Error: GRD ERROR - Syntax Error at or near symbol / Open Tile Channel Error Message One of these two errors occur when performing a spatial operation with the ArcView Spatial Analyst extension:"GRD ERROR - Syntax error at or near symbol to Shapefile or Grid""Open Tile Channel" Cause Path and/or name of the shapefile or the grid is not 8.3 compliant. Solution or Workaround Make sure the path and the file name of the grid or shapefile are 8.3 compliant. For a file or path name to be 8.3 compliant, the prefix portion of the name must not be longer than 8 characters. The suffix portion of the name must be 3 characters long exactly. Additionally, the path or file name must not contain special characters, such as, spaces, #, $, and so forth. Note: To avoid data corruption, use Manage Data Sources. A. Click File > Manage Data Sources in the View.B. Click Copy and select a location that is 8.3 compliant. Created: 5/5/2016 Last Modified: 5/5/2016 Article ID: 000002544 Software: ArcView GIS 3.2, 3.2a Is This Content Helpful? Is This Content Helpful? Yes No We're glad to know this article was helpful. How can we make this better? Submit Contact our Support Team Request Case Start Chat Questions or issues with the site? Send Feedback Contact Support USA +1-888-377-4575 Name Email URL Please rate your online support experience with Esri's Support website.* Poor Below Satisified Satisfied Above Satisfied Excellent What issues are you having with the site? How can we improve? Submit Feedback sent successfully. Error while sending mail. Loading
without it enabled. Please turn JavaScript back on and reload this page.All Places > Developers > GIS Developers > Python > DiscussionsLog in to create and rate content, and to follow, bookmark, and share content with other members.AnsweredAssumed AnsweredFailed to http://support.esri.com/technical-article/000002544 execute (RastertoPolygon) Syntax error at or near symbol SPACEQuestion asked by warlubartdu on May 21, 2015Latest reply on May 21, 2015 by sephefox Like • Show 0 Likes0 Comment • 3I'm converting series of https://geonet.esri.com/thread/159456 raster to polygon using RastertoPolygon in arcpy.#import the module
import arcpy
from arcpy.sa import *
from arcpy import env
arcpy.CheckOutExtension("Spatial")
env.overwriteOutput = True
arcpy. #import the module import arcpy from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") env.overwriteOutput = True #set the workspace http://www.faqssys.info/failed-to-execute-rastertopolygon-syntax-error-at-or-near-symbol-space/ env.workspace = r"C:thesisfor samplingsampling_outputsraster_per_biogeoregion" #Get a list of rasters and convert to shapefile for raster in arcpy.ListRasters("*Luzon_*.tif", "TIF"): print raster #check the presence of rasters arcpy.RasterToPolygon_conversion(raster, raster.replace("tif", "shp"), "NO_SIMPLIFY") print "Finish converting all the rasters to polygon" After several checks on the syntax, formatting, I've always been stuck with this error: Traceback (most recent call last): File syntax error "C:UsersbrentiebarkDropboxPython Scripts and mxdsbatch_convert_raster_to_polygon_simple.py", line 14, in arcpy.RasterToPolygon_conversion(raster, raster.replace("tif", "shp"), "NO_SIMPLIFY") File "C:Program Files (x86)ArcGISDesktop10.1arcpyarcpyconversion.py", line 178, in RasterToPolygon raise e ExecuteError: ERROR 010328: Syntax error at or near symbol SPACE. ERROR 010267: Syntax error in parsing grid expression. Failed to execute (RasterToPolygon). Are there things that I missed from this code? arcpy, error-010328, spatial-analyst written by grid error - admin Post navigation Arcmap export select By Graphics with queryQGIS Python Scripting permission denied One response to Failed to execute (RastertoPolygon) Syntax error at or near symbol SPACE answered May 21 at 16:06 says: June 14, 2015 at 7:20 am The error in your "RastertoPolygon" script is due to a space in the file name of one or more of your input rasters. To confirm this answer, I ran your script on a folder of raster files and it worked perfectly. I added a space to the file name of one of the rasters and it failed with the message "ExecuteError: ERROR 010328: Syntax error at or near symbol SPACE", which is the same error message that you got. Arcpy does not allow spaces or periods in file names. Please make sure that none of your input file names have special characters like spaces or periods in them and try again. Leave a Reply Cancel Reply Search for: Tags7 2013 arcgis-desktop bash c++ calculus cc.complexity-theory electrical email facebook google grammar homework-and-exercises ios