Previous built binder repo suddenly with 404 error


I have two repos that were Binder ready and ran very smoothly for several years. This week though, suddenly neither of them could run. Could someone please help diagnose the problem? Thanks!!

repo1: GitHub - yajuna/tmath307: repo for TMATH307 codes

repo2: GitHub - yajuna/tmath308: Python Jupyter from tmath308 summer 19

Interesting. Your launches work. Sort of. You just need to specify if you want the classic notebook interface, if that is what you indeed prefer? A few months ago the default switched to JupyterLab, see here and here and here.

You can link to the classic notebook dashboard/tree interface successfully by changing the code for your launch badge for the first repo you posted to this:


For the second one, the launch link would be similar at the end, specifying the repo in the earlier part:

You are seeing the 404 error because JupyterLab isn’t working for you. That is odd. I suspect because you have runtime.txt there limiting Python to an old version? (Just a guess because I haven’t seen this yet.) Do you need the old version? If you do and you don’t care about JupyterLab, I think you’ll be okay with just fixing your launch link to specify the classic notebook interface.

From the 404 error page you are seeing presently, if you just changed the end of the URL in your browser from reading /lab to reading /tree you would have switched interfaces in the already running session. It is handy trick to know about that when troubleshooting things like you were encountering that prompted your post.

Awesome, thank you so much! It has worked for me! I will look a little closer, as JupyterLab used to work for me a few weeks ago.

Thanks again!

I wonder if it is something that will get sorted out behind-the-scenes soon then. I don’t see anything obvious. Your configuration is not overly complex.

I checked ~/.jupyter-server-log.txt when running GitHub - yajuna/tmath307: repo for TMATH307 codes in mybinder:

[I 19:15:06.900 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 19:15:07.422 NotebookApp] Error loading server extension jupyter_resource_usage
    Traceback (most recent call last):
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/notebook/", line 2033, in init_server_extensions
        mod = importlib.import_module(modulename)
      File "/srv/conda/envs/notebook/lib/python3.6/importlib/", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_resource_usage/", line 5, in <module>
        from .server_extension import load_jupyter_server_extension
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_resource_usage/", line 6, in <module>
        from jupyter_resource_usage.metrics import PSUtilMetricsLoader
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_resource_usage/", line 6, in <module>
        from jupyter_server.serverapp import ServerApp
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_server/", line 83, in <module>
        from import SessionManager
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_server/services/sessions/", line 22, in <module>
        from jupyter_server.traittypes import InstanceFromClasses
      File "/srv/conda/envs/notebook/lib/python3.6/site-packages/jupyter_server/", line 7, in <module>
        from traitlets.utils.descriptions import describe
    ModuleNotFoundError: No module named 'traitlets.utils.descriptions'
[W 19:15:07.431 NotebookApp] Error loading server extension jupyterlab

conda list shows traitlets 4.3.3 which is an old version. Later versions of traitlets require Python 3.7

but you’re using Python 3.6

The long term fix may be for repo2docker to decouple the notebook environment (including the Python version) from the server (JupyterLab) environment, though that can cause other complications, for instance when setting up kernels.

1 Like

Oh thank you so much for checking! fomightez earlier has asked if the older version was the problem, and that was my first guess too. I specified Python 3.6 because I wrote these labs on a Ubuntu 18.04 machine, and the default Python3 was 3.6. Upgrading Python to 3.7 on that machine has caused a lot of headache, so I figured I would just be fine with the older version. But looks like it is time to upgrade to Ubuntu 20.04.

Thanks again!

Thank you so much, this is very helpful! I appreciate the detailed answer and now I know how to switch between JupyterLab or the classic notebook. :slight_smile:

1 Like

In repo2docker the Python environment is installed using Conda with packages from conda-forge, so it’s independent of the operating system. This means you can easily run almost any version of Python without worrying about operating system dependencies. If you’re having trouble with the operating system Python it’s worth looking at (I almost always use Conda for managing Python).

1 Like