arcgis-python-api
arcgis-python-api copied to clipboard
show_batch module display has no attribute 'display_html
Hi all, I am quite new to coding in general and have been working through some examples for deep learning regarding point clouds.
I am running into an error with the show_batch function(see attached). From other examples this function seems to run through arcgis Pro.
Any suggestions will be greatly appreciated. Currently running ArcGIS Pro 3.0.2
I am also receiving this same error when using data.show_batch().
AttributeError Traceback (most recent call last) In [6]: Line 1: data.show_batch(rows=1)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn_utils\pointcloud_data.py, in show_point_cloud_batch: Line 824: fig.show()
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\plotly\basedatatypes.py, in show: Line 2794: return pio.show(self, *args, **kwargs)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\plotly\io_renderers.py, in show: Line 376: bundle = renderers._build_mime_bundle(fig_dict, renderers_string=renderer, **kwargs)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\plotly\io_renderers.py, in _build_mime_bundle: Line 285: self._activate_pending_renderers(cls=MimetypeRenderer)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\plotly\io_renderers.py, in _activate_pending_renderers: Line 192: renderer.activate()
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\plotly\io_base_renderers.py, in activate: Line 324: ipython_display.display_html(script, raw=True)
AttributeError: module 'display' has no attribute 'display_html'
@Arksi325 Could you confirm if you are using notebook within arcgis pro?
Yes! I was working through this Sample Tutorial:
https://developers.arcgis.com/python/samples/creating-building-models-using-point-cloud-classification/
Using cbm.ipynb Notebook provided in the following download:
https://www.arcgis.com/home/item.html?id=50390f56a0e740ac88c72ae1fb1eda7a
@vbhv14 Could you please look into this? I am able to reproduce the same issue. Additionally, the user has used export_point_dataset class as well. This is not covered in the sample notebook, is that missed out or there's some mistake in the user workflow?
export_point_dataset is not used in the sample notebook,
Pro tool should be used for exporting the data.
This function has been deprecated starting from ArcGIS API for Python version 1.9.0. Export data using Prepare Point Cloud Training Data tool available in 3D Analyst Extension from ArcGIS Pro 2.8 onwards.
For show_batch()issue,
I suggest using jupyter notebook instead, for now, till this is fixed.

I am getting the same error, when following this notebook from this code:
geemap.bar_chart( df, x='class', y='area', x_label='Land Cover Type', y_label='Area (km2)', )
@vbhv14
export_point_dataset is no longer supported and its visualization is not supported.
And for pro exported datasets, this has been fixed now, for the next release of ArcGIS API for Python via PR: #11401