arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

show_batch module display has no attribute 'display_html

Open Arksi325 opened this issue 3 years ago • 8 comments
trafficstars

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 error

Arksi325 avatar Oct 14 '22 04:10 Arksi325

I am also receiving this same error when using data.show_batch().

mcampbell1039 avatar Dec 03 '22 18:12 mcampbell1039


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'

sledgesickle avatar Feb 07 '23 17:02 sledgesickle

@Arksi325 Could you confirm if you are using notebook within arcgis pro?

priyankatuteja avatar Apr 26 '23 17:04 priyankatuteja

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

sledgesickle avatar Apr 26 '23 18:04 sledgesickle

@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?

priyankatuteja avatar Apr 27 '23 02:04 priyankatuteja

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. image

vbhv14 avatar Apr 27 '23 03:04 vbhv14

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)', )

WangariKimotho avatar Jun 19 '23 16:06 WangariKimotho

@vbhv14

priyankatuteja avatar Jul 11 '23 05:07 priyankatuteja

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

vbhv14 avatar Apr 01 '24 08:04 vbhv14