I tried to run a python script for getting the coordinate system of a feature/shapefile as follow
>>> import arcpy
>>> from arcpy import env
>>> env.workspace="D:\data"
>>> fc="river.shp"
>>> dsc=arcpy.Describe(fc)
>>> dsc.spatialReference.Name
>>> print dsc
i'm getting following error at line 5
Attributeerror:'NoneType' object has no attribute Name.
Best Answer
Replacing this line:
with:
or
or
should enable it to work but, if you are using ArcGIS 10.1 like me, you will also need to use ".Name" without the capital i.e. ".name".
My working test code:
returns this (as expected):