Nb on binder with parameters now resulting in 404

I have several notebooks that use jupyter-notebookparams. Until this week (2023-10-09), they worked fine, but now result in a 404 error. The notebook continues to work if not called with a parameter so I think the problem must have been caused by a change on binder that has broken notebookparams. Here is a link to the notebook with a parameter value that now fails. Here is a link to the same notebook with no parameter value which still works. Does anyone know what could be wrong and how to fix it? Thanks.


I suspect these several issues, three so far, are all related:

They all involve MyBinder sessions parsing the URL and doing something beyond the basics of switching between JupyterLab and classic interface. I just posted about my suspicions about two if these here.

At least the nbgitpuller thing seems related to uri encoding issue somewhere 404 error · Issue #329 · jupyterhub/nbgitpuller · GitHub

1 Like

I believe given this issue ’ question: this wouldn’t work with jupyterlab, would it?’ this actually isn’t YET a simply URL encoding/resolving problem like I think the other two seem to be.

At the time that issue was written, it didn’t work in JupyterLab and now all the tech is based on that, by default. I believe it would need to opt in to using NbClassic to continue to work. I know from the example JupyterLab 4 + Notebook 7 + NBClassic on Binder it is possible to run NbClassic alongside the others via MyBinder. You can go there and click on the link to launch. When the session comes up replace tree at the end with nbclassic. You may want to try adding nbclassic==1.0.0 to your configuration file requirements.txt to at least get it there. However, I don’t know the URL combo to specify how to launch directly into that interface yet. And then even if that works, you may finally hit the problem with the URL parsing/resolving being a little ‘off’ lately. (I would try all that first in your fork of the main notebookparams repo: GitHub - berniegsfc/jupyter-notebookparams: Takes query parameters from a url to create the first cell of a jupyter notebook. ).

Thanks for including the dates, this is really helpful as it means we know when the change most likely occurred. A mybinder.org update was merged 2 days ago which matches the timeframe:
Updates binderhub chart to 1.0.0-0.dev.git.3228.h30733fe by jupyterhub-bot · Pull Request #2770 · jupyterhub/mybinder.org-deploy · GitHub

1 Like

It is working again now!

1 Like

I reverted the change and it should work again now! Some conversation in Add failing test for js client URL with query by manics · Pull Request #1774 · jupyterhub/binderhub · GitHub about how to properly fix it.

1 Like

@berniegsfc we’ve redeployed the original change, with a fix (jupyterhub/binderhub#1774). Your link continues to work for me! Can you try it out and let me know if you have problems?

We’re working on cleaning up the binderhub frontend code, and making it more robust (adding unit tests, refactoring, type checks, etc). This break was unfortunately a side effect of that, but hopefully the added tests and robustness will make things better in the long run - you’ll see that the fix PR has more lines of test than fix!

Thank you for your patience and continuing to use mybinder.org :slight_smile: And thanks to @consideRatio and @manics for helping fix this!

1 Like

I have tested all of my notebooks that use notebookparams and they all work now. Thank you and everyone who helped to resolve this quickly. I is good that you have added tests for this type of problem. I do not usually test my binder notebooks unless I make a change. But last week, the notebooks were tested in preparation for a presentation at the Data, Analysis, and Software in Heliophysics workshop. Binder is a great resource to demonstrate small, example notebook.

1 Like