Phantom maps preventing Save As Project Template

358
2
12-10-2021 11:47 AM
Eric_Castonguay
New Contributor III

My aprx I created with the intent of saving as a Project Template somehow has more maps than are listed in the catalog pane.   These four phantom maps cause an error when I save as a Project Template, so I would like to remove them (and find out where they came from if possible).

When I run a script to list maps I get the following results:

Code:

aprx = arcpy.mp.ArcGISProject("CURRENT")
maps = aprx.listMaps()
for m in maps:
    print(m.name)

Results:

2 Sale Map1
2 Sale Map2
1 Location Map
2 Sale Map
Title Block Driver
Title Block Driver1
Title Block Driver2

However, the catalog pane only shows three maps (1 Location Map, 2 Sale Map, Title Block Driver):

Eric_Castonguay_0-1639165289818.png

I was able to get the Project Template to save by removing all layers from the four phantom maps through a python script, then adding a blank layer back to all four.  But, the maps still persist and may cause future issues.

Any ideas on removing these maps, where they are being stored, or where they came from?

2 Replies
ABishop
MVP Regular Contributor

Hello Eric,

Each ArcGIS Pro project has a default "home" location for storing items that are created in a project.  To my knowledge there isn't a "folder path" that can be uncovered for these maps.  I believe if you right-click on the map name you can delete it?

Here is a link that describes the anatomy of an ArcGIS Pro project.  Hope this helps!

https://pro.arcgis.com/en/pro-app/latest/help/projects/what-is-a-project.htm 

Amanda Bishop, GISP
0 Kudos
Eric_Castonguay
New Contributor III

Hello Amanda,

The problem I have is the four phantom maps that need deleted are not listed in the project's maps folder or any of the other default project folders.  I have only found them in the following 3 locations:

  1. Running listMaps in python
  2. Manage Data Sources from the catalog view. 
  3. When a tool or process fails the layers contained in the phantom maps are referenced

I cannot find a way to directly interact with the phantom maps and unfortunately the layers that are causing issues are all feature services and are not able to be edited from Manage Data Sources.

0 Kudos