jupyterlab_code_formatter: format option is not in commad pallet and not shown at all

Regarding this issue, I have the same problem, but my jupyter serverextension list is ok and I have installed jupyter_lab_formatter

So what may it be a problem?

λ jupyter serverextension list
config dir: C:\Users\metya\.jupyter
    jupyter_tensorboard enabled
    - Validating...
      jupyter_tensorboard 0.1.8 ok
    nbresuse enabled
    - Validating...
      nbresuse  ok
    jupyterlab_git enabled
    - Validating...
      jupyterlab_git  ok
    jupyterlab_code_formatter enabled
    - Validating...
      jupyterlab_code_formatter  ok
config dir: C:\ProgramData\Anaconda3\etc\jupyter
    jupyterlab enabled
    - Validating...
      jupyterlab 0.35.4 ok
    jupyterlab_github enabled
    - Validating...
      jupyterlab_github 0.7.0 ok
    nbresuse enabled
    - Validating...
      nbresuse  ok
    nbextensions disabled
    - Validating...
Error loading server extension nbextensions
      X is nbextensions importable?
λ jupyter labextension list
JupyterLab v0.35.4
Known labextensions:
   app dir: C:\ProgramData\Anaconda3\share\jupyter\lab
        @deathbeds/jupyterlab_graphviz v0.1.1 enabled  ok
        @ijmbarr/jupyterlab_spellchecker v0.1.4 enabled  ok
        @jupyter-widgets/jupyterlab-manager v0.38.1 enabled  ok
        @jupyterlab/celltags v0.1.4 enabled  ok
        @jupyterlab/geojson-extension v0.18.1 enabled  ok
        @jupyterlab/git v0.4.2 enabled  ok
        @jupyterlab/github v0.10.0 enabled  ok
        @jupyterlab/google-drive v0.16.0 enabled  ok
        @jupyterlab/katex-extension v0.20.0 enabled  ok
        @jupyterlab/latex v0.6.1 enabled  ok
        @jupyterlab/plotly-extension v0.18.1 enabled  ok
        @jupyterlab/statusbar v0.5.0 enabled  ok
        @jupyterlab/toc v0.6.0 enabled  ok
        @krassowski/jupyterlab_go_to_definition v0.1.6 enabled  ok
        @lckr/jupyterlab_variableinspector v0.1.0 enabled  ok
        @mflevine/jupyterlab_html v0.1.4 enabled  ok
        @ryantam626/jupyterlab_code_formatter v0.2.0 enabled  ok
        jupyter-gmaps v0.8.2 enabled  ok
        jupyterlab-chart-editor v1.0.0 enabled  ok
        jupyterlab-jupytext v0.1.0-dev enabled  ok
        jupyterlab_bokeh v0.6.3 enabled  ok
        jupyterlab_nbmetadata v0.1.0 enabled  ok
        jupyterlab_tensorboard v0.1.5 enabled  ok

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 28 (12 by maintainers)

Most upvoted comments

FWIW, I experienced the same issue, only to find out that while I had installed the labextension and the serverextension, I forgot to actually install the package (pip install jupyterlab_code_formatter). Doing that and then restarting the server fixed my problem.

@ryantam626 The issue is solved now (by reinstallation of extension) and the problem is no more. Thanks for being active and for your time.

oh wow I should learn to read instructions better - I’m so used to just installing lab extensions. after installing the package the formatter works fine

just wondering what the package is for? is there no way to roll everything into a single lab extension?

The package provides server extension, which is used for actually running the code for formatting and for determining the existence of formatters.

There is a way to roll everything into a single lab extension, making the running kernel run the format_str (or other equivalent formatting functions) would be one way, but I don’t really like my notebook to have skipping exec count so I didn’t go for that 🙈