According to 3D Mode | ArcGIS for Developers
if I call
world_countries_item <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN><SPAN class="keyword token">get</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'ac80670eb213440ea5899bbf92a04998'</SPAN><SPAN class="punctuation token">)</SPAN>
world_countries_layer <SPAN class="operator token">=</SPAN> world_countries_item<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
world_countries_layer
I should see some output
ops_map <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN><SPAN class="token function">get</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'3fcf74a391804b81bff12d56442f23d5'</SPAN><SPAN class="punctuation token">)</SPAN>
ops_map_layer <SPAN class="operator token">=</SPAN> ops_map<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
But I get
Traceback <SPAN class="punctuation token">(</SPAN>most recent call last<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
File <SPAN class="string token">"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">6773</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> __getitem__
<SPAN class="keyword token">return</SPAN> dict<SPAN class="punctuation token">.</SPAN>__getitem__<SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> k<SPAN class="punctuation token">)</SPAN>
KeyError<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'layers'</SPAN>
During handling of the above exception<SPAN class="punctuation token">,</SPAN> another exception occurred<SPAN class="punctuation token">:</SPAN>
Traceback <SPAN class="punctuation token">(</SPAN>most recent call last<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
File <SPAN class="string token">"<string>"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> <SPAN class="operator token"><</SPAN>module<SPAN class="operator token">></SPAN>
File <SPAN class="string token">"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">6746</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> __getattribute__
<SPAN class="keyword token">if</SPAN> self<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'layers'</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">==</SPAN> None <SPAN class="operator token">or</SPAN> self<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'layers'</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">==</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">:</SPAN>
File <SPAN class="string token">"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">6777</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> __getitem__
<SPAN class="keyword token">return</SPAN> dict<SPAN class="punctuation token">.</SPAN>__getitem__<SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> k<SPAN class="punctuation token">)</SPAN>
KeyError<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'layers'</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
This is a real working AGOL map with many layers, so what's going on here? And yes I'm logged as the same owner of the map