Error message for the buffer tool

898
5
06-25-2013 01:49 PM
ShikoNjuno
Occasional Contributor
Hi folks
I'm having issues troubleshooting an error message while trying to set my buffer parameters.

The intention is to create a selection criteria on an ArcGIS Map to generate areas that are 1000 feet around any major roads.
I have already defined roads as a variable, and the following is the tool parameter that I'm trying to input, which sets the optional dissolve parameter to ALL , so that overlapping buffers are dissolved:

buffer = arcpy.Buffer_analysis(roads, "in_memory/buffer", "1000 Feet", "", "", "ALL")

Now I keep getting an error message with the word buffer highlighted but I don't know what's wrong. Also, as I type the word buffer in the IDLE screen it turns purple. Does this mean it has some kind of internal definition or something?
Tags (2)
0 Kudos
5 Replies
DavidAllen
Occasional Contributor
Hi folks
I'm having issues troubleshooting an error message while trying to set my buffer parameters.

The intention is to create a selection criteria on an ArcGIS Map to generate areas that are 1000 feet around any major roads.
I have already defined roads as a variable, and the following is the tool parameter that I'm trying to input, which sets the optional dissolve parameter to ALL , so that overlapping buffers are dissolved:

buffer = arcpy.Buffer_analysis(roads, "in_memory/buffer", "1000 Feet", "", "", "ALL")

Now I keep getting an error message with the word buffer highlighted but I don't know what's wrong. Also, as I type the word buffer in the IDLE screen it turns purple. Does this mean it has some kind of internal definition or something?


I think buffer is a key word and you can't use it for layer names. Can you try "in_memory/buffer_roads" ?
0 Kudos
ShikoNjuno
Occasional Contributor
You know I think I may have other issues going on because it doesn't matter what I name that variable...it still comes out highlighted as an error.
Could it be that for 10.1 version the syntax is different, in that I don't have to define a variable?
0 Kudos
ChrisSnyder
Regular Contributor III
Try running the buffer tool without the dissolve "ALL" option:

buffer = arcpy.Buffer_analysis(roads, "in_memory/buffer", "1000 Feet")


Does it work?
0 Kudos
ShikoNjuno
Occasional Contributor
I did....and it still takes me back to that error point.
I'm also now calling the variable 'buffer_'.
I guess I need to look at the entire script prior to this point to see if there's syntax that's throwing off the program.
Thanks guys
0 Kudos
ChrisSnyder
Regular Contributor III
The word 'buffer' is not a keyword in Python. See: http://forums.arcgis.com/threads/4679-Buffer-error?p=21932&viewfull=1#post21932
0 Kudos