OpenGeoscience / geonotebook

A Jupyter notebook extension for geospatial visualization and analysis
Apache License 2.0
1.08k stars 141 forks source link

M.layers.annotation.polygons[0].data - IndexError: list index out of range #147

Closed dementiev closed 6 years ago

dementiev commented 6 years ago

When I run 3rd cell from

https://github.com/OpenGeoscience/geonotebook/blob/master/notebooks/04_Annotations.ipynb

d, n = next(M.layers.annotation.polygons[0].data)

I receive:

IndexError Traceback (most recent call last)

in () ----> 1 d, n = next(M.layers.annotation.polygons[0].data) 2 #d, n = next(M.layers.annotation.rectangles[1].data) IndexError: list index out of range
dorukozturk commented 6 years ago

@dementiev Thanks for creating the issue. You should create an annotation using the buttons. The error is simply saying there are no polygons.

deepinscreenshot_select-area_20170908123417

dementiev commented 6 years ago

Got it, thanks!