DrColgate

DescribeData: Method spatialReference does not exist

Discussion created by DrColgate on Sep 5, 2011
Latest reply on Sep 7, 2017 by tyler_searls
I encountered this problem running a Python script and the only related thread states the solution is running 'Describe' rather than 'DescibeData'.  The problem is then resolved but as a work around rather than a solution.  However it is stated specifically that 'Describe' was being used in the first place.

http://forums.arcgis.com/search.php?searchid=654992

I am encountering the same problem and am definitely using 'Describe' also.  Specifically

desc = arcpy.Describe('C:\\image.ers\\Band_1')
datum = desc.spatialReference.datumName
cellSizeVal = desc.meanCellWidth

The reason I am using Band_1 is that the Mean Cell Width method only works on some of the data when I specify this.  Otherwise the error "DescribeData: Method meanCellWidth does not exist" occurs.  Once again this is a reference to 'DescribeData' when using 'Describe'.  On the other hand sometimes 'Band_1' does not exist for DEM files.  I would have thought this referenced only a single band with a default of Band_1 for us people out here in user land.  Should I remove 'Band_1' from the Describe input then I get the same "DescribeData: Method spatialReference does not exist" error again.

In addition to this I also get nothing as a value in some cases when I run the 'desc.spatialReference.datumName' method and it does not produce an IOError.  While this is a legitimate failure of a user to assign a coordinate system in some cases in others the data is found easily in ArcCatalog.

Outcomes