Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotators wont work in geoviews #526

Closed
sbonaime opened this issue Sep 21, 2021 · 7 comments · Fixed by #583 or #610
Closed

annotators wont work in geoviews #526

sbonaime opened this issue Sep 21, 2021 · 7 comments · Fixed by #583 or #610

Comments

@sbonaime
Copy link

sbonaime commented Sep 21, 2021

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

Capture d’écran 2021-09-21 à 21-09-21 11 24 27

@philippjfr
Copy link
Member

Please also report your bokeh and panel versions. Thanks!

@sbonaime
Copy link
Author

bokeh 2.3.3 py39hecd8cb5_0
panel 0.12.1 pyhd3eb1b0_0

@pmav99
Copy link
Contributor

pmav99 commented Jan 13, 2022

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

@maximlt
Copy link
Member

maximlt commented Jan 13, 2022

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.

@gracebato
Copy link

gracebato commented Jul 15, 2022

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

Screen Shot 2022-07-15 at 1 27 11 PM

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:

Screen Shot 2022-07-15 at 1 37 48 PM

Is there any way I can use the annotators from geoviews? How do I build the installation so I can use it? Thanks.

@maximlt
Copy link
Member

maximlt commented Jul 18, 2022

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

@hoxbro hoxbro mentioned this issue Jul 19, 2022
1 task
@pmav99
Copy link
Contributor

pmav99 commented Jul 29, 2022

I tested #583 and it does seems to fix the issue. Great job @hoxbro !

hoxbro added a commit that referenced this issue Jan 5, 2023
Updated package.json

Updated tsconfig.json to match with panel and updated manifest with TS/bokeh files. I think this will fix #526 when installing from pip / conda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants