I am trying to pass a buffer variable and seem to have run into some sort of limitation of the command.

The buffer will vary each time the script is run so I need to have this parameter variable

varBuffer = 5 # in this instance
varBufffer = '"'+ varQuan + ' Miles"'

I tried this but it does not work:

arcpy.Buffer_analysis(projectArea, MileBuff_shp, varBuffer, "FULL", "ROUND", "ALL", "")

Only this works.

arcpy.Buffer_analysis(projectArea, MileBuff_shp, "5 Miles", "FULL", "ROUND", "ALL", "")

Is there a work around for this?

1 Answer 1


This worked, Duh.

varBufffer = varQuan + " Miles"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.