I am trying to run a script to create a polygon layer in a gdb and keep coming up with this error -
Traceback (most recent call last): File "I:\GIS Data\ArcToolBox\SiteBoundaryCreation_FMG_Format.py", line 87, in polygon.created_date = surveyStartDate < --- this is the line the error refers to
File "d:\programs\arcgis\desktop10.3\arcpy\arcpy\arcobjects_base.py", line 35, in __setattr__return setattr(self._arc_object, attr, ao)
RuntimeError: ERROR 999999: Error executing function.
Failed to execute (SiteBoundaryFMG). Failed at Tue Aug 28 16:12:43 2018 (Elapsed Time: 3.35 seconds)
The following section of code is where line 87 sits -
#new variable Polygon. Set it to create a new row in variable areacur (defined on Line43) at the cursor point (set in areacur) polygon = areacur.newRow() #set the shape property of the polygon variable to pntarray (which was set on line 107) polygon.shape = pntarray #set the various field to variable defined and assigned above polygon.Site_Name = siteID polygon.Site_Type = primT polygon.Date_created = surveyStartDate **<-- this is the line the error refers to** polygon.Project = projectName polygon.Survey_ID = surveyIDName polygon.created_user = userName polygon.created_date = userCreatedDate
is it something to do with the name in the line? or is it unrelated? the line the error is referring to is an optional field when using the tool in the arcmap toolbox (see attached image - Survey Start Date (Optional)). would this have something to do with the error?