I currently have two conda environments configured for use with ArcGIS Python API installed on my machine.
The first one is based on a full Anaconda install, the later one is based on ArcGIS Pro's Python environment.
The installation based on ArcGIS Pro has the following issue when working with the ArcGIS Python API in Jupyter Notebook: Objects do not show their HTML representation.
For example, the following script shows a nice Picture in the Anaconda environment:
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> <SPAN class="operator token">*</SPAN>
gis <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">from</SPAN> IPython<SPAN class="punctuation token">.</SPAN>display <SPAN class="keyword token">import</SPAN> display<SPAN class="punctuation token">,</SPAN> display_html
item <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>search<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'Flights'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
display<SPAN class="punctuation token">(</SPAN>item<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
However, the ArcGIS Pro based environment just prints this line:
<Item title:"flight AH 5017" type:Web Map owner:mista_moneybags><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
If I change display(item) to display_html(item), the output is all empty.
However, if I change to
display_html(item._repr_html_(), raw=True)<SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
the output is all fine.
So the HTML-Rendering basically works, as well as the object is able to represent itself as HTML.
Any ideas, why the standard display() / display_html() does not work as expected?
Kind Regards
Jens