500: Internal Server Error Launching Classic Notebook

I have been using Binder to run notebooks in the same repo for a few years. I recently added a new notebook and tried to rebuild and launch the repository, changing nothing else, but the build would not complete. The build seemed to be failing to find the right packages, so I specified some versions in my requirements.text file, and the build completed. However, now I cannot open a notebook in classic view (only JupyterLab). I receive “500: Internal Server Error”.

Here is a link to the working JupyterLab, and a link to particular notebook in Classic view (which fails to open).

1 Like

The involved repo: GitHub - mitx-803/vis (Please in the future include the actual repo address, too so those trying to help you don’t have to go reverse engineering links.)

This probably would have been difficult to track down had I not already had a clue. In the past nbinteract would interfere with JupyterLab working in MyBinder launches, see here, for example. Now it seems JupyterLab works but the classic notebook interface has compatibility issues.

Tested & confirmed this as the issue at my fork where the only change I made was deleting nbinteract in requirements.txt. In session launched like from here where I then switch to the Jupyter Notebook interface by changing the end of the URL from /lab to /tree and then try to open the notebook interface. (For your current repo, even though the notebook dashboard opens going that route, opening the individual notebooks via the link gives the 500 error issue you posted about.) Then I can click on double_slit_interference_1.ipynb to open it and it will open.
The launch direct to the notebook should be fixed. I haven’t actually test it because OVH was not fetching the image in a timely manner; however, I suspect it will since it will be a valid path now.

Option:
If you need nbinteract for other places you use this repo… You can make a new directory binder (or .binder) and put just a requirements.txt that MyBinder will use in it. There you can remove nbinteract while leaving it in the requirements.txt in the root. For more about that, see here where it says:

" Configuration files may be placed in the root of your repository or in a binder/ folder in the repository’s root (i.e. myproject/binder/ ).

3 Likes

Thanks, I see that your fix works! For example, now this link will open a notebook directly (the use case that I wanted). It would have taken me a long time to figure out to remove nbinteract.

I made the change in my own repo and rebuilt, now it works (although it took considerably long to launch)!

(Also, apologies for not including a link to my repo previously. As a first-time poster, I was limited to only including 2 links).

2 Likes