annotators wont work in geoviews
sbonaime opened this issue · 7 comments
Maybe linked to #462
ALL software version info
Macos 11.5.2
Chrome 93.0.4577.82
geoviews 1.9.1 pypi_0 pypi
geoviews-core 1.9.1 pyh06a4308_0
jupyter 1.0.0 py39h6e9494a_6 conda-forge
jupyter_client 7.0.1 pyhd3eb1b0_0
jupyter_console 6.4.0 pyhd8ed1ab_0 conda-forge
jupyter_core 4.7.1 py39hecd8cb5_0
jupyterlab_pygments 0.1.2 py_0
jupyterlab_widgets 1.0.2 pyhd8ed1ab_0 conda-forge
Jupyter kernel Python 3 (ipykernel)
I also try with
geoviews 1.9.1 py_0 pyviz
and
geoviews 1.9.1 pyhd8ed1ab_1 conda-forge
with the same result
Description of expected behavior and the observed behavior
With the example notebook
https://examples.pyviz.org/assets/ml_annotators.zip
I'm getting no annotation tools showing up, and the same Uncaught Error: Model 'geoviews.models.custom_tools.ClearTool' does not exist. This could be due to a widget or a custom model not being registered before first usage. message in the console.
Stack traceback and/or browser JavaScript console output
Uncaught Error: Model 'geoviews.models.custom_tools.ClearTool' does not exist. This could be due to a widget or a custom model not being registered before first usage.
at u.get (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:306:1010)
at Function._instantiate_object (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:305:4811)
at Function._instantiate_references_json (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:305:4999)
at Function.from_json (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:305:8497)
at Object.t.embed_items_notebook (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:729:2437)
at embed_document (<anonymous>:5:22)
at <anonymous>:8:5
at <anonymous>:24:3
at eval (eval at append_javascript (main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:59195), <anonymous>:138:28)
at Array.forEach (<anonymous>)
get @ VM67:306
_instantiate_object @ VM67:305
_instantiate_references_json @ VM67:305
from_json @ VM67:305
t.embed_items_notebook @ VM67:729
embed_document @ VM151:5
(anonymous) @ VM151:8
(anonymous) @ VM151:24
eval @ VM69:138
handle_add_output @ VM69:127
dispatch @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
v.handle @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
trigger @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
(anonymous) @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
each @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
each @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
trigger @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
events.trigger @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:54255
OutputArea.append_output @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:58791
OutputArea.handle_output @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:58693
output @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:60519
Kernel._handle_output_message @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:62280
i @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
Kernel._handle_iopub_message @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:62320
Kernel._finish_ws_message @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:62099
(anonymous) @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:62090
Promise.then (async)
Kernel._handle_ws_message @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:62090
i @ main.min.js?v=f1ffcc85342b2a9c45ba434c8f1ce101d995e4384bfa196254b0682e057f067d246c34e884bed8d784d3165a09864d5dc58f19b32fcab07130e8f9542f7c76a5:2
Screenshots or screencasts of the bug in action
Please also report your bokeh and panel versions. Thanks!
bokeh 2.3.3 py39hecd8cb5_0
panel 0.12.1 pyhd3eb1b0_0
In case it helps, the example from the documentation does work with geoviews 1.7.0 but it is broken with later versions
https://geoviews.org/user_guide/Annotators.html
Thanks @pmav99 for the info. The version of geoviews you mention was based on 'bokeh >=1.4.0,<2.0.0'
while the latest release if based on 'bokeh >=2.4.0,<2.5'
. This suggests that recent versions of Bokeh broke the annotators.
@philippjfr @maximlt Hi, I've been testing the annotators example (https://pyviz-dev.github.io/geoviews/user_guide/Annotators.html) but similar to other posts, geoviews won't output a result.
Here are my packages:
geoviews 1.9.4
geoviews-core 1.9.4
bokeh 2.4.2
panel 0.13.1
python 3.9.12
I've also tried with geoviews=1.7.0
but I'm having compatibility issues with shapely
.
Without installing geoviews though (e.g. conda create -n hvtest -c pyviz holoviews bokeh
). I can run holoview's annotators without an issue:
Is there any way I can use the annotators from geoviews? How do I build the installation so I can use it? Thanks.
The annotators still need to be fixed!
What type of compatibility issue did you have with Shapely while trying to install GeoViews 1.7? Did you start to create an environment from scratch? GeoViews 1.7 was release in March 2020. At about the same time Shapely 1.7 was also released, so I suggest you try installing them together (e.g. with conda create -n you-env-name -c conda-forge python=3.8 geoviews=1.7 shapely=1.7
).