xarray-contrib / xarray_leaflet

An xarray extension for tiled map plotting.
https://xarray-leaflet.readthedocs.io
MIT License
157 stars 21 forks source link

LocalTileLayer does not appear on map #84

Closed agirnow closed 1 year ago

agirnow commented 1 year ago

Hello !

First of all thanks for the work, this library sounds amazing and I can't wait to try it.

However, I still have difficulties to run the introduction notebooks from my machine (Ubuntu 22). When lauching introduction.ipynb as a jupyter notebook, I have this JavaScript error at block 7 when layer is added on the map :

Failed to create view for 'UrlView' from module 'ipyurl' with model 'UrlModel' from module 'ipyurl'
ReferenceError: process is not defined
    at e.makeSettings (http://localhost:8888/nbextensions/ipyurl/index.js?v=20230426160827:2:69011)
    at e.makeSettings (http://localhost:8888/nbextensions/ipyurl/index.js?v=20230426160827:2:67987)
    at o.get_url (http://localhost:8888/nbextensions/ipyurl/index.js?v=20230426160827:2:404124)
    at o.render (http://localhost:8888/nbextensions/ipyurl/index.js?v=20230426160827:2:403836)
    at http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js?v=20230426160827:2:747630 

My environment was created from scratch using /binder/environment.yml with python 3.10, notably my ipyurl version is 0.1.2 and my xarray-leaflet version is 0.1.16

Here are my jupyter versions :

Many thanks for any help !

davidbrochart commented 1 year ago

Hi @agirnow, thanks for the kind works! What version of ipyurl do you have? Try installing v0.1.3, which requires ipywidgets>=7,<8.

agirnow commented 1 year ago

Thanks for your reply !

I have updated ipywidgets to 7.6.0 and ipyurl to 0.1.3, and it removed the JavaScript error I had before. However, I still do not have anything that displays on the map, executing block 7 just relocates the map to the zone of interest without displaying anything...

Do you have any idea about what can cause this ?

Many thanks, Alexandre

agirnow commented 1 year ago

Any idea @davidbrochart ?

davidbrochart commented 1 year ago

Any error reported in the browser console?

agirnow commented 1 year ago

Capture Yes, here they are

davidbrochart commented 1 year ago

Could you provide the output of pip list, or the equivalent if it's a conda environment?

agirnow commented 1 year ago

env.txt Here you will find the complete list of my conda environment.

davidbrochart commented 1 year ago

I think your environment is not clean, I see:

jupyter-server=1.24.0=pypi_0
jupyter_server=2.5.0=pyhd8ed1ab_0

Could you try again with a fresh env?

agirnow commented 1 year ago

Thanks, it seems that I am making progress !

Now I have a colorbar that displays but no data and map, and a collection of errors like this :

[E 16:07:11.517 NotebookApp] Error unpacking user from cookie: Expecting value: line 1 column 1 (char 0)
[W 16:07:11.517 NotebookApp] Clearing invalid/expired login cookie username-localhost-8888
[I 16:07:11.517 NotebookApp] 302 GET /xarray_leaflet/tmp/xarray_leaflet_iao94655/2/3/1.png (127.0.0.1) 1.140000ms
davidbrochart commented 1 year ago

Can you provide your environment details again?

agirnow commented 1 year ago

Sure ! env2.txt

davidbrochart commented 1 year ago

With your environment, it works fine on my side, using JupyterLab. It looks like you have authentication issues with Notebook?

agirnow commented 1 year ago

@davidbrochart the weekend brought advice, i no longer have issues with the introduction notebooks, everything is working fine ! Many thanks for your help :)