I am attempting to complete an exercise in chapter 11 of the book "Python Scripting for ArcGIS Pro". One of the example code bits i'm trying to run is this:
import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\Users\shildebr\Documents\PythonScripting_Ex11_Data\Ex11\Austin.aprx")
print(aprx.defaultGeodatabase)
When I run this I get this message:
File "H:/EsriTraining/Python Scripting for ArcGIS Pro/PythonScripting_Ex11_Data/Ex11/projects.py", line 2, in <module>
aprx = arcpy.mp.ArcGISProject(r"C:\Users\shildebr\Documents\PythonScripting_Ex11_Data\Ex11\Austin.aprx")
AttributeError: 'module' object has no attribute 'mp'
Isn't "defaultGeodatabase" a property of the ArcGISProject object? I'm really confused as to why this won't run.