Problems accessing layer information with decribe()

Discussion created by mllo1 on Apr 3, 2012
Latest reply on Apr 19, 2012 by foresterdave
I am writing a standalone python script (i.e not within arcmap) that attempts to extract the coordinates of selected features (as they appear selected in the current map document).  The commands that make up my script (see below) work fine if I execute them within the python window in arcmap but not when I try to use them within a standalone script.

mxd= mapping.MapDocument(r'c:\GIS\project\map.mxd)
myLyr= mapping.ListLayers(mxd, 'features')[0]
desc= Describe(myLyr)

NB. 'features' is the name of a point feature layer. The datasource of this layer is within a personal geodatabase i.e. within test.gdb.

The script blows us when it gets to the last command in spite of the fact that myLyr is indeed a layer (I checked this when debugging). I cannot think of what I am doing wrong so any help will be appreciated.