Mar-11-2024, 12:21 AM
# is the start of a line comment in Python. Everything following # in the line is a comment. Don't depend on syntax highlighting.
The error message told you where the error happened.
The error message told you where the error happened.
Error:Traceback (most recent call last):
File "D:/ArcPy_Ex/test.py", line 5, in <module>
outfc = arcpy.GetParameterAsText(1)
NameError: name 'arcpy' is not defined
Note the lack of a comment character in outfc = arcpy.GetParameterAsText(1)