sle06

arcpy, spatial reference

Discussion created by sle06 on Dec 9, 2011
Latest reply on Dec 9, 2011 by sle06
When setting an ouputcoordinate system in python I keep getting an error.

Here's a sample of the code up to the point where the error occurs.

import arcpy, os, sys
print "Processing ..."

#set up a relative path.  This returns the folder where the script is
relativePath = os.path.dirname(sys.argv[0])

#Set up environment settings
arcpy.env.workspace = "c:/.gdb"
arcpy.env.overwriteOutput = True
arcpy.env.outputCoordinateSystem="Coordinate Systems/Projected Coordinate Systems/State Plane/NAD 1983(US Feet)/NAD 1983 StatePlane Pennsylvania North FIPS 3701(US Feet).prj"

This error is returned:
Traceback (most recent call last):
  File "Y:\Planning\GIS Planning Analyst\projects\county_map_book\1_GenerateIndexLayers.py", line 11, in <module>
    arcpy.env.outputCoordinateSystem="Coordinate Systems/Projected Coordinate Systems/State Plane/NAD 1983(US Feet)/NAD 1983 StatePlane Pennsylvania North FIPS 3701(US Feet).prj"
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 505, in set_
    self[env] = val
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 557, in __setitem__
    ret_ = setattr(self._gp, item, value)
RuntimeError: <unprintable RuntimeError object>


Any help will be greatly appreciated.

SE

Outcomes