opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.23k stars 389 forks source link

Unable to find widget 'anywidget' #826

Closed TimJMartin closed 4 months ago

TimJMartin commented 4 months ago

When trying to use the LonBoard option within leafmap, to display a gdf with the following command

leafmap.view_vector(location_results_gdf, get_fill_color=[0, 0, 255, 128])

I receive the following error in VSCode

Unable to find widget 'anywidget' version '0.9.3' from configured widget sources ["jsdelivr.com","unpkg.com"]. Expected behavior may be affected. Click here for more information.

Following the instructions found at the link I have added the code to the settings.json, restarted and continue to get the error.

Leafmap version = 0.35.9 Selected Jupyter core packages... IPython : 8.18.0 ipykernel : 6.29.2 ipywidgets : 7.7.2 jupyter_client : 8.6.0 jupyter_core : 5.7.1 jupyter_server : 2.14.1 jupyterlab : 4.2.3 nbclient : 0.10.0 nbconvert : 7.16.4 nbformat : 5.10.4 notebook : 7.2.1 qtconsole : not installed traitlets : 5.14.1

On a Windows laptop (10 enterprise) using Python version 3.11.8

The same gdf works using gdf.explore() with no problem so it does seem to be the use of LonBoard where the need for anywidget is called for and cannot be found.

This is my first attempt to use leafmap so I may have missed some package to install separately.

Many thanks for your help

giswqs commented 4 months ago

Can you try some lonboard examples directly without leafmap? If it doesn't work either, then it is probably an lonboard installation issue.

https://developmentseed.org/lonboard/latest/examples/

TimJMartin commented 4 months ago

@giswqs - Ok I will give that a try. thanks

Cidree commented 4 months ago

Hello! Did you solve this? I have a similar error:

image

TimJMartin commented 4 months ago

@giswqs - sorry for delay. Only just had a chance to try some IonBoard examples and yes I get the same error. So closing this here. I do think it could be a firewall issue my end which is blocking the connection to that location to get anywidgets