I'm using ArcPy to iterate through maps in a Pro project. I have only one map in the Project called "Mines".
However, when I use listMaps to iterate through the maps in the aprx, it returns two values called "Mines". Any ideas why this is? Furthermore, if I list all the layers in each "Mines" map, the layers are slightly different. The first Mines map in the list contains layers that I actually deleted from the Pro Project, but the second one doesn't have this problem. And yes, I saved the Pro Project.
Here's the code:
aprx = arcpy.mp.ArcGISProject(path_to_project)
for mp in aprx.listMaps("Mines"):
print(mp.name)Really strange. Someone tell me I'm not in the Twilight Zone.