Closed robintw closed 2 years ago
We'll, I'm excited to hear anyone's even using show
! A couple questions first:
stackstac.server_stats
, does the widget indicate there are any computations or HTTP requests active? Does it show anything completing?show
, do you see requests for PNGs not from openstreetmap, to a URL on the Jupyter server? I expect they'd all be pending.FWIW, yesterday I was debugging an issue with show
where it can be extremely slow, many minutes for tiles to show up. It appears there's a bug in the Dask client where it'll wait many minutes before sending more messages to the scheduler, which I'm trying to track down. One anecdotal thing to try is skipping the persist
.
Thanks for the quick response.
I've been using show
a lot on Planetary Computer as a great way to interactively visualise what I'm working on. I've also combined it with some IPython widget interaction functionality to make some simple interactive apps that use planetary computer data in the background, being processed by Dask in (near) real-time. It's great!
Responses to questions below:
Are you using JupyterLab locally (and not, say, vscode)?
I realised when you asked this that I was using the traditional Jupyter Notebook interface on my local machine, whereas on Planetary Computer I was using JupyterLab. I've just tried with JupyterLab locally and I'm still running into the same problems.
If you run stackstac.server_stats, does the widget indicate there are any computations or HTTP requests active? Does it show anything completing?
If display the widget and then run show
and move the map a bit, the 'computing' bar fills up and empties again fairly quickly (and I can see some computations taking place on the Dask dashboard), but the 'HTTP requests' bar stays at zero.
If you open the web browser's network inspector before you add things to the map, once you run show, do you see requests for PNGs not from openstreetmap, to a URL on the Jupyter server? I expect they'd all be pending.
I'm seeing various PNGs that are coming from a HTTP request to a Jupyter URL, and they are all coming back with 404 errors:
If you browse the map somewhere far away from where the data is, do you get checkerboards? If you can't get checkerboards anywhere, then it's an issue communicating with the local webserver serving the tiles. If just the areas that would contain data are blank, it's probably an issue communicating with dask.
No, there are no checkerboards displayed anywhere, even if I scroll a long way away from where the data should be.
I've had a few intermittent problems on Planetary Computer with the actual data not displaying, but the checkboards always appeared. In these cases, restarting the kernel or restarting the Dask cluster seems to fix it - but that seems to be a different problem to the problem I'm experiencing locally.
@robintw this might actually be really simple: you don't have jupyter-server-proxy installed, and I forgot to add it as a required dependency for viz
🤦. Try installing that and see if it fixes things?
Unfortunately that's already installed (I'm using one of the Planetary Computer docker images: the one here).
I'll do some more detailed debugging next week, but looking in the developer tools, I think the requests for the tiles were giving a HTTP 500 Error. Is there any way to get more insight into what the tile server is doing behind the scenes, and what is causing the 500 error?
Ok, in the screenshot you posted I saw 404s, meaning the URL requested didn't exist, which is exactly what would happen if the proxy wasn't running. And the conda environment listed doesn't have it, so I would think that was your original problem locally.
500s indicate something different. Getting error messages is extremely hard, because JupyterLab appears determined to swallow all the errors coming from coroutines no matter what logging level you set. I'd recommend opening the web inspector and looking at the contents of the 500 response, that may be the best clue you can get. There are also some code changes I can make to try to capture the errors and make them more easily visible.
Sorry, I think I commented on the wrong PR and confused things.
The issue with the empty map with no checkboards is the one I raised in this issue. This occurred when running on my local machine, which does not have jupyter-server-proxy
installed. I've just tried installing it, and it completely fixes the issue: both the checkerboard and the data itself now appear on the map. Thanks!
Next week I'll continue debugging the problem I'm having when running within docker on my machine, using one of the planetary computer docker images. That's the one that's giving me a 500 error. I'll create a separate issue for that.
I'm running into a problem with
stackstac.show
. I've got a simple notebook that grabs some data from Planetary Computer, mosaics it, and then shows it on a map usingstackstac.show
. This works fine when I run it on Microsoft Planetary Computer, but when I run it locally, I don't get any data (or any checkerboard pattern) on the map - I just get the background OpenStreetMap data.The key parts of the code are below, and the full ipynb file is available here.
Am I doing something wrong here when running locally, or have I discovered a bug? When running the
show
call I can see various Dask jobs being run when looking at the Dask dashboard - which suggests that something is happening - but the result never seems to be displayed.In case it is relevant, I'm running on Windows 10, with the following in my conda enviroment: