from the help topic
get the current document
get the first dataframe called "yosemite national park"
get a list of the layers
do stuff with the layer IF it supports showlabels
p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps("Yosemite National Park")[0]
for lyr in m.listLayers():
if lyr.supports("SHOWLABELS"):
lblClasses = lyr.listLabelClasses()
yours
get the current project
get the first dataframe called Map
try to get its spatial reference which... it works... will just return a spatial reference object and not its name
so even if that works you might want m.spatialReference.name (check spelling is it S or small s in spatialReference)
So see
Introduction to arcpy.mp—ArcPy | ArcGIS for Desktop and
Map—ArcPy | ArcGIS for Desktop
but here is the only place you are going to get the SR
SpatialReference—ArcPy Classes | ArcGIS for Desktop since the map and map frame apparently don't have any concept of SR that I can find...however, I haven't fully explored all, and all hasn't been ported yet