3-manifolds / sagedocker

The kitchen sink with SnapPy, SageMath, Regina, and friends
6 stars 2 forks source link

AttributeError: 'ExtensionManager' object has no attribute '_extensions' due to "old" nbclassic version #1

Open WPettersson opened 3 years ago

WPettersson commented 3 years ago

Just decided to fire this up, and attempt to use the jupyterlabs sage notebook option, but upon doing so I got the following error:

Traceback (most recent call last):
  File "/sage/src/bin/sage-notebook", line 218, in <module>
    launcher(unknown)
  File "/sage/src/bin/sage-notebook", line 63, in __init__
    main(argv)
  File "/sage/local/lib/python3.8/site-packages/jupyter_server/extension/application.py", line 518, in launch_instance
    serverapp = cls.initialize_server(argv=args)
  File "/sage/local/lib/python3.8/site-packages/jupyter_server/extension/application.py", line 488, in initialize_server
    serverapp.initialize(
  File "<decorator-gen-7>", line 2, in initialize
  File "/sage/local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/sage/local/lib/python3.8/site-packages/jupyter_server/serverapp.py", line 1855, in initialize
    point = self.extension_manager.extension_points[starter_extension]
  File "/sage/local/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 290, in extension_points
    extensions = self.extensions
  File "/sage/local/lib/python3.8/site-packages/nbclassic/nbserver.py", line 80, in extensions
    nb = self._extensions.get("nbclassic")
AttributeError: 'ExtensionManager' object has no attribute '_extensions'

This seems to be https://github.com/jupyterlab/jupyterlab/issues/10228 popping up, and can be alleviated with pip install "nbclassic>=0.2.8"

I tried to work out where such a command would be appropriate to insert, but couldn't quite work it out.

culler commented 3 years ago

We recommend using the %pip magic command to install pip packages in the SageMath app. (And I mistakenly assumed that this ticket was about that app when I received the email.) But perhaps it also works in the docker image. I am not sure.

NathanDunfield commented 3 years ago

Thanks for the report, we will be sure to fix it in the next release.