I created a ModelBuilder routine and exported it to Python, so that I could add some custom code in the middle.
When I try to run the script, it stops with a syntax error in the final statement, pointing to the scratch workspace file geodatabase.
Any ideas on what I can fix? I can't see the problem. Thanks.
import arcpy
def ScheduledTaskMilepostsNeedsPythonPRO(): # Scheduled Task Mileposts Needs Python PRO
< my code >
if __name__ == '__main__':
# Global Environment settings
# workspace=r"\\spokanecounty.org\publicworks\GIS\WorkShop\xArcGISProTasks\WorkRoadSegments.gdb"):
with arcpy.EnvManager(outputCoordinateSystem="PROJCS["NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.8333333333333],PARAMETER["Standard_Parallel_1",47.5],PARAMETER["Standard_Parallel_2",48.73333333333333],PARAMETER["Latitude_Of_Origin",47.0],UNIT["Foot_US",0.3048006096012192]]", preserveGlobalIds=True, scratchWorkspace=r"\\mynetworklocation\xArcGISProTasks\WorkRoadSegments.gdb\",
workspace=r"\\mynetworklocation\xArcGISProTasks\WorkRoadSegments.gdb\"):
ScheduledTaskMilepostsNeedsPythonPRO()