elyra-ai / elyra

Elyra extends JupyterLab with an AI centric approach.
https://elyra.readthedocs.io/en/stable/
Apache License 2.0
1.86k stars 344 forks source link

Jupyter-server-terminals python package fails to list properly #3058

Closed akchinSTC closed 1 year ago

akchinSTC commented 1 year ago

Describe the issue Installing elyra now causes jupyter server >2 to be pulled in and transitively jupyter-server-terminals. When attempting to list the server extensions with the jupyter cli, the following occurs.

$ jupyter server extension list

Config dir: /Users/akchin/.jupyter

/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server_terminals/__init__.py:8: UserWarning: Could not import submodules
  warnings.warn("Could not import submodules")
Traceback (most recent call last):
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 320, in add_extension
    extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 166, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 1357, in __init__
    value = self._traits[key]._cross_validate(self, getattr(self, key))
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 743, in _cross_validate
    value = obj._trait_validators[self.name](obj, proposal)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 1229, in __call__
    return self.func(*args, **kwargs)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 175, in _validate_name
    self._module, self._metadata = get_metadata(name)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/utils.py", line 58, in get_metadata
    return module, module._jupyter_server_extension_points()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server_terminals/__init__.py", line 15, in _jupyter_server_extension_points
    "app": TerminalsExtensionApp,
NameError: name 'TerminalsExtensionApp' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/akchin/opt/anaconda3/envs/remove/bin/jupyter-server", line 8, in <module>
    sys.exit(main())
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_core/application.py", line 269, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/config/application.py", line 992, in launch_instance
    app.start()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/serverapp.py", line 2814, in start
    self.start_app()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/serverapp.py", line 2710, in start_app
    super().start()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_core/application.py", line 258, in start
    self.subapp.start()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/serverextension.py", line 368, in start
    super().start()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_core/application.py", line 258, in start
    self.subapp.start()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/serverextension.py", line 342, in start
    self.list_server_extensions()
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/serverextension.py", line 323, in list_server_extensions
    config_dir, ext_manager = _get_extmanager_for_context(**option)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/serverextension.py", line 59, in _get_extmanager_for_context
    extension_manager = ExtensionManager(
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/config/configurable.py", line 86, in __init__
    super().__init__(**kwargs)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 1364, in __init__
    self.notify_change(changes[key])
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 1513, in notify_change
    return self._notify_observers(change)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/traitlets/traitlets.py", line 1560, in _notify_observers
    c(event)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 253, in _config_manager_changed
    self._load_config_manager(change.new)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 308, in _load_config_manager
    self.from_jpserver_extensions(jpserver_extensions)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 313, in from_jpserver_extensions
    self.add_extension(name, enabled=enabled)
  File "/Users/akchin/opt/anaconda3/envs/remove/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 325, in add_extension
    if self.serverapp.reraise_server_extension_failures:
AttributeError: 'NoneType' object has no attribute 'reraise_server_extension_failures'
make: *** [check-install] Error 1

To Reproduce Steps to reproduce the behavior:

Screenshots or log output If applicable, add screenshots or log output to help explain your problem.

Log Output
Paste the log output here.

Expected behavior List the server extensions successfully.

Deployment information Describe what you've deployed and how:

kevin-bates commented 1 year ago

Let's revisit once this issue is resolved: https://github.com/jupyter-server/jupyter_server/issues/1134

kevin-bates commented 1 year ago

This has been resolved upstream.