0

I'm trying to learn how to create Script Tools in ArcGIS Pro, so I thought I would start small with a tutorial on https://www.e-education.psu.edu/geog485/node/120

The tutorial has you make a simple buffer tool, but whenever I check the module it says invalid syntax.

Here is my script and the error message. I know that it is identifying "arcpy" on the last line as the problem. I just don't know why.

enter image description here

  • 1
    For future reference if you are seeking help with code, past in the code formatted not a screen shot. In this case code the snippet is short enough but next time please paste the code itself as it is easier to deal with, especially if one has to copy it into their IDE and attempt to run it. – Hornbydd Nov 17 '17 at 15:52
3

You need to finish your try: statement with an except: statement.

Immediately before the arcpy.buffer code, write:

except:
   pass

That'll make your code run. Note, this isn't a good practice. You'd actually want to catch and do something with the erorr (if there was one)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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