I cannot import an mxd. It saves as a blank document.
I have the following code:
#Open the blank project
aprx_blank = arcpy.mp.ArcGISProject(aprx_path_blank)
#create a copy of the blank project to the local drive
aprx_path = temp_path / "aprx_temp.aprx"
aprx_path_string = str(aprx_path)
if os.path.exists(aprx_path_string):
os.remove(aprx_path_string)
aprx_blank.saveACopy(aprx_path_string)
aprx_copy = arcpy.mp.ArcGISProject(aprx_path_string)
#Import the mxd into the copy projet
mxd_path_string = str(root / directory / (file_name + ".mxd"))
aprx_copy.importDocument(mxd_path_string)
aprx_copy.save()
mxd_path_string is a valid URI that points to the correct map.
When I open the aprx_temp.aprx file in ArcGIS Pro, the map is empty.
Why isn't save working?