question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v1.4.1 not working with Jupyterlab 2

See original GitHub issue

When I install v1.4.1 of jupyterlab_code_formatter with v2.2.9 of Jupyterlab, then I am unable to enable the server extension.

conda create --name jl-jcf --channel conda-forge --yes jupyterlab=2 python=3.8 nodejs jupyterlab_code_formatter isort black
conda activate jl-jcf
jupyter serverextension enable --py jupyterlab_code_formatter
Traceback (most recent call last):
  File "C:\tools\miniconda3\envs\jl-jcf\Scripts\jupyter-serverextension-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\jupyter_core\application.py", line 254, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\traitlets\config\application.py", line 845, in launch_instance
    app.start()
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\notebook\serverextensions.py", line 291, in start
    super().start()
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\jupyter_core\application.py", line 243, in start
    self.subapp.start()
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\notebook\serverextensions.py", line 208, in start
    self.toggle_server_extension_python(arg)
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\notebook\serverextensions.py", line 197, in toggle_server_extension_python
    m, server_exts = _get_server_extension_metadata(package)
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\notebook\serverextensions.py", line 325, in _get_server_extension_metadata
    m = import_item(module)
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\traitlets\utils\importstring.py", line 38, in import_item
    return __import__(parts[0])
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\jupyterlab_code_formatter\__init__.py", line 4, in <module>
    from .handlers import setup_handlers
  File "C:\tools\miniconda3\envs\jl-jcf\lib\site-packages\jupyterlab_code_formatter\handlers.py", line 3, in <module>
    from jupyter_server.base.handlers import APIHandler
ModuleNotFoundError: No module named 'jupyter_server'

Obviously, Jupyterlab 2 does not install jupyter_server.

Using jupyterlab=2 and jupyterlab_code_formatter<1.4 seems to work fine.

conda list

# packages in environment at C:\tools\miniconda3\envs\jl-jcf:
#
# Name                    Version                   Build  Channel
argon2-cffi               20.1.0           py38h294d835_2    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     20.3.0             pyhd3deb0d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.1                      py_0    conda-forge
bleach                    3.2.1              pyh9f0ad1d_0    conda-forge
brotlipy                  0.7.0           py38hab1e662_1001    conda-forge
ca-certificates           2020.12.5            h5b45459_0    conda-forge
certifi                   2020.12.5        py38haa244fe_1    conda-forge
cffi                      1.14.4           py38hd8c33c5_1    conda-forge
chardet                   4.0.0            py38haa244fe_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              3.3.1            py38hd8c33c5_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.6.0                      py_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
importlib-metadata        3.3.0            py38haa244fe_2    conda-forge
importlib_metadata        3.3.0                hd8ed1ab_2    conda-forge
ipykernel                 5.4.2            py38h7b7c402_0    conda-forge
ipython                   7.19.0           py38hc5df569_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.0           py38haa244fe_1    conda-forge
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                3.2.0                      py_2    conda-forge
jupyter_client            6.1.7                      py_0    conda-forge
jupyter_core              4.7.0            py38haa244fe_0    conda-forge
jupyterlab                2.2.9                      py_0    conda-forge
jupyterlab_code_formatter 1.4.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         1.2.0                      py_0
libsodium                 1.0.18               h8d14728_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                1.1.1            py38hab1e662_2    conda-forge
mistune                   0.8.4           py38h294d835_1002    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
nbclient                  0.5.1                      py_0    conda-forge
nbconvert                 6.0.7            py38haa244fe_3    conda-forge
nbformat                  5.0.8                      py_0    conda-forge
nest-asyncio              1.4.3              pyhd8ed1ab_0    conda-forge
nodejs                    15.3.0               h57928b3_0    conda-forge
notebook                  6.1.6            py38haa244fe_0    conda-forge
openssl                   1.1.1i               h8ffe710_0    conda-forge
packaging                 20.8               pyhd3deb0d_0    conda-forge
pandoc                    2.11.3.2             h8ffe710_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.8.1              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       20.3.3             pyhd8ed1ab_0    conda-forge
prometheus_client         0.9.0              pyhd3deb0d_0    conda-forge
prompt-toolkit            3.0.9              pyha770c72_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pygments                  2.7.3              pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyrsistent                0.17.3           py38h294d835_1    conda-forge
pysocks                   1.7.1            py38h9bdc248_2    conda-forge
python                    3.8.6           h7840368_4_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pywin32                   228              py38h1e8a9f7_0    conda-forge
pywinpty                  0.5.7            py38h32f6830_1    conda-forge
pyzmq                     20.0.0           py38h7a0e47e_1    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                49.6.0           py38h9bdc248_2    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.34.0               h8ffe710_0    conda-forge
terminado                 0.9.2            py38haa244fe_0    conda-forge
testpath                  0.4.4                      py_0    conda-forge
tornado                   6.1              py38h294d835_0    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
urllib3                   1.26.2             pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_2    conda-forge
vs2015_runtime            14.28.29325          h5e1d092_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
win_inet_pton             1.1.0            py38h32f6830_1    conda-forge
wincertstore              0.2             py38haa244fe_1006    conda-forge
winpty                    0.4.3                         4    conda-forge
zeromq                    4.3.3                h0e60522_3    conda-forge
zipp                      3.4.0                      py_0    conda-forge

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jayqicommented, Feb 28, 2021

In general, conda-forge feedstocks aren’t necessarily maintained by the same people as the package itself. If there’s a problem with the conda-forge metadata, you’ll want to open an issue on the feedstock repo.

Was just skimming this repo and saw this issue, so in case it’s still a problem, I hope the above helps. @jamesmyatt

1reaction
jamesmyattcommented, Jan 11, 2021

Actually, looking at setup.py, I think this is a conda package problem.

edit, i.e. setup.py says 1.4.1 requires jupyterlab~=3.0, but the conda-forge package must say any version of jupyterlab.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
Sets whether the model is collaborative or not when registering its factory ... Fix progress bar not working after uploading multiple files finished...
Read more >
jupyter lab - JupyterLab/Elyra: pipeline run on Kubeflow ...
The root cause is an issue in the Kubeflow Pipelines kfp package version 1.0.0 that is distributed with Elyra v1.4.1 (and lower). To...
Read more >
Extension shows up as both installed and uninstalled and ...
JupyterLab · zaneselvans November 14, 2019, 2:52pm #1. Somehow I seem to have gotten my installed extensions into a not entirely working and/or...
Read more >
Panel in jupyterlab no interactivity
But the output value is not updated (4+2!=4) while changing the slider, i.e. there is no interactivity in Jupyterlab. The widget is working ......
Read more >
Common issues — pandas-profiling dev documentation - YData
Common issues · TypeError: _plot_histogram() got an unexpected keyword argument 'title' · Conda installation defaults to v1.4.1 · Jupyter “IntSlider(value=0) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found