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

Widget renders intermittently #189

Open
gjoseph92 opened this issue Oct 29, 2021 · 1 comment
Open

Widget renders intermittently #189

gjoseph92 opened this issue Oct 29, 2021 · 1 comment

Comments

@gjoseph92
Copy link

The ipyleaflet map embedded in https://stackstac.readthedocs.io/en/stable/examples/gif.html (it's right above the "Search for STAC items" heading) usually shows up the first time you open the page in a new browser, but subsequent times, usually nothing renders. If you switch to a different version (say, https://stackstac.readthedocs.io/en/v0.2.1/examples/gif.html), you might get it again once.

Maybe related to #163 (comment)?

Here's what I saw on a successful load:
Screen Shot 2021-10-28 at 7 18 46 PM

And unsuccessful:
image

On the successful load, you can see it at least tries to load jupyter-leaflet.js from https://stackstac.readthedocs.io/en/v0.2.1/examples/jupyter-leaflet.js, which 404s (because it's not there):
Screen Shot 2021-10-28 at 7 20 37 PM

But it then falls back to unpkg and succeeds:
Screen Shot 2021-10-28 at 7 20 44 PM

Whereas when nothing shows up, it doesn't even try to load jupyter-leaflet.js.

Could there be some sort of race condition, maybe related to the other failures loading thebelab (or Gumshoe, or the mismatched anonymous define error), where a browser cache miss is giving a script enough time to kick off the JupyterLab load before it fails with one of these other errors? Just a wild guess.

If it helps at all, this is the notebook being rendered (uses a raw restructuredtext cell). And versions are:

jupyter-sphinx = {version = "^0.3.2", optional = true}
Sphinx = {version = "^3.5.4", optional = true}
furo = {version = "^2021.4.11-beta.34", optional = true}
ipywidgets = {version = "^7.6.3", optional = true}
@12rambau
Copy link
Contributor

Hi @gjoseph92, I am myself using jupyter-sphinx a lot with geospatial data and I never experienced what you are describing. I'm always using the pydata-sphinx-theme or the sphinx-book-theme, could you switch your documentation to the latter and let me know if the bug persists ?

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

No branches or pull requests

2 participants