Just had our first encounter with this error, and we're a shop that doesn't use Reclassify, or really work with imagery at all.
BACKGROUND: I'm the tech guy, I upgraded from 2.9.9 to 3.2.2 earlier this year, and the rest of the mappers have now followed suit. When my colleague tried to open one of his .aprx files for a quarterly update process, he got a "Failed to open map view" error on one of the project's 9 maps.
Things I've tried while troubleshooting:
- Copying the broken map (No option to Paste)
- Duplicating the broken map (Pops up the same error message)
- Renaming the broken map (Spins for a while, then stops, without the name updating)
- Accessing the broken map via the listMaps method of the arcpy.mp.ArcGISProject object (Semi-success. I cannot retrieve the broken map with a wildcard search, but calling listMaps without a wildcard returns a list of 9 maps: the 8 working maps, and a map with no name.)
So now I have this arcpy.mp.Map object with no name, and I did some more testing. The name property is an empty string, and when I try to set it, I get this error:
Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\_base.py", line 109, in _set
return setattr(self._arc_object, attr_name, cval(val))
AttributeError: can't set attribute
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\_base.py", line 112, in _set
raise NameError(
NameError: The attribute 'name' is not supported on this instance of Map.
So, that's pretty weird.
Next I tried calling arcpy.Describe, and the Python window thought for a long time before returning this error message:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 1335, in Describe
return gp.describe(value, data_type)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 392, in describe
self._gp.Describe(*gp_fixargs(args, True)))
RuntimeError: Object: Describe input value is not valid type
A similar thing happens when calling getDefinition, either V2 or V3:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\utils.py", line 191, in fn_
return fn(*args, **kw)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\_mp.py", line 3944, in getDefinition
return GetJSONTypeOBJ(json.loads(convertArcObjectToPythonObject(self._arc_object.GetCimJSONString(*gp_fixargs((cim_version), True)))))
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Somehow, against all odds, this broken Map object with no name, no definition, no description, can still return the full table of contents when I call listLayers.
And that's as far as I went with it.