-
Notifications
You must be signed in to change notification settings - Fork 21
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
'LeafletMap' object has no attribute 'base_url' in JupyterLab #42
Comments
Following @gjoseph92 's suggestion, I changed the relevant code in the xarray_leaflet.py and it is now finally working in my Jupyterlab (3.0.16). |
Sorry for not replying earlier @gjoseph92, in your particular case The current implementation is wrong, but I couldn't come up with an acceptable solution yet. If you have ideas, please don't hesitate to share. |
Correct, what I posted doesn't work in generality (particularly Binder). For stackstac, I ended up going with this regex which works fine, though I don't love that it's specific to Also @davidbrochart you might be interested in |
Thanks for sharing your work on stackstac, it looks interesting! |
Ah no, all I meant is that
This is a limitation of xarray-leaflet as well. It should be possible to get around with some clever dask graph rewriting, but I won't get to that for a while. |
See #45 |
It seems that inferring the base URL is failing for me in JupyterLab 3.0.12.
The
.window_url
of my map is'http://localhost:8888/lab/workspaces/auto-s/tree/nb/leaflet.ipynb'
, which doesn't match the.endswith("lab")
logic trying to identify JupyterLab. Maybe the URL scheme has changed recently?I'm imagine missing something here, but is the goal of the "find the base URL" logic to figure out the URL of the Jupyter server? In that case, would something like
work for all the cases in general?
The text was updated successfully, but these errors were encountered: