Skip to content

Bad UX when disabling a server extension with a misspelled or non-existent name #1507

Open
@Darshan808

Description

@Darshan808

Original Issue:

This issue was initially reported in JupyterLab repository jupyterlab/jupyterlab#17422 , where a similar behavior occurs when disabling a frontend extension with a misspelled name.

Description

When attempting to disable a Jupyter Server extension with a misspelled or non-existent name using:

  • jupyter server extension disable <extension_spelled_wrong>

Even if the extension is not present, the command does not show an error but instead lists the wrongly spelled extension as disabled. Later, when trying to enable the extension and running jupyter server extension list, a cross mark appears, indicating that the extension is not present.

Reproduce

  1. Disable an extension with a misspelling, such as:
jupyter labextension disable jupyter-server-nbmodel  # (should be jupyter_server_nbmodel)
  1. The command incorrectly lists jupyter-server-nbmodel as disabled, even though it's not valid. Run jupyter server extension list to see
 jupyter-server-nbmodel disabled
    - Validating jupyter-server-nbmodel...
      jupyter-server-nbmodel  OK
  1. After running jupyter server extension enable jupyter-server-nbmodel, it shows a cross mark, indicating the extension isn't present.
jupyter-server-nbmodel enabled
    - Validating jupyter-server-nbmodel...
       X The module 'jupyter-server-nbmodel' could not be found (No module named 'jupyter-server-nbmodel'). Are you sure the extension is installed?

Expected behavior

When the extension is misspelled (i.e., not present), a message should be shown, such as:

No extension named 'jupyter-server-nbmodel' found.

Context

  • Operating System and version: Linux Ubuntu 24.04 LTS
  • Jupyter_server version : 2.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions