jupyter-lsp / jupyterlab-lsp

Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
https://jupyterlab-lsp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.81k stars 149 forks source link

Cannot open Diangnostics panel #385

Closed stefaneidelloth closed 4 years ago

stefaneidelloth commented 4 years ago

jupyterlab-lsp shows pep 8 issues but I am not able to find/open "show diagnostics panel" from command palette: image

=> Is there another way to show diagnostics panel, e.g. key shortcut? => How can I find out more about that issue? Is there some kind of log of jupyterlab-lsp?

Here is the output of jupyter labextension list

root@ead842543f65:/home/test# jupyter labextension list
JupyterLab v2.2.8
Known labextensions:
   app dir: /usr/local/share/jupyter/lab
        @jupyterlab/git v0.22.1  enabled  OK
        @krassowski/jupyterlab-lsp v2.0.7  enabled  OK
        @lckr/jupyterlab_variableinspector v0.5.1  enabled  OK
        nbdime-jupyterlab v2.0.1  enabled  OK

Here is the output for jupyter troubleshoot:

root@ead842543f65:/home/test# jupyter troubleshoot
WARNING: You are using pip version 20.2.2; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
$PATH:
        /usr/local/sbin
        /usr/local/bin
        /usr/sbin
        /usr/bin
        /sbin
        /bin

sys.path:
        /usr/local/bin
        /usr/lib/python38.zip
        /usr/lib/python3.8
        /usr/lib/python3.8/lib-dynload
        /usr/local/lib/python3.8/dist-packages
        /usr/lib/python3/dist-packages

sys.executable:
        /usr/bin/python3

sys.version:
        3.8.5 (default, Jul 28 2020, 12:59:40)
        [GCC 9.3.0]

platform.platform():
        Linux-4.19.76-linuxkit-x86_64-with-glibc2.29

which -a jupyter:
        /usr/local/bin/jupyter

pip list:
        Package                           Version
        --------------------------------- ---------
        alembic                           1.4.3
        argon2-cffi                       20.1.0
        astroid                           2.4.2
        async-generator                   1.10
        attrs                             20.2.0
        autopep8                          1.5.4
        backcall                          0.2.0
        bcrypt                            3.2.0
        bleach                            3.2.1
        certifi                           2020.6.20
        certipy                           0.1.3
        cffi                              1.14.3
        chardet                           3.0.4
        colorama                          0.4.4
        cryptography                      3.1.1
        dbus-python                       1.2.16
        decorator                         4.4.2
        defusedxml                        0.6.0
        entrypoints                       0.3
        flake8                            3.8.4
        gitdb                             4.0.5
        GitPython                         3.1.9
        idna                              2.10
        ipykernel                         5.3.4
        ipython                           7.18.1
        ipython-genutils                  0.2.0
        isort                             5.6.4
        jedi                              0.17.2
        Jinja2                            2.11.2
        json5                             0.9.5
        jsonschema                        3.2.0
        jupyter-client                    6.1.7
        jupyter-contrib-core              0.3.3
        jupyter-contrib-nbextensions      0.5.1
        jupyter-core                      4.6.3
        jupyter-highlight-selected-word   0.2.0
        jupyter-latex-envs                1.4.6
        jupyter-lsp                       0.9.2
        jupyter-nbextensions-configurator 0.4.1
        jupyter-telemetry                 0.1.0
        jupyterhub                        1.2.0b1
        jupyterhub-nativeauthenticator    0.0.5
        jupyterlab                        2.2.8
        jupyterlab-git                    0.22.1
        jupyterlab-latex                  2.0.0
        jupyterlab-pygments               0.1.2
        jupyterlab-server                 1.2.0
        lazy-object-proxy                 1.4.3
        lxml                              4.6.1
        Mako                              1.1.3
        MarkupSafe                        1.1.1
        mccabe                            0.6.1
        mistune                           0.8.4
        nbclient                          0.5.1
        nbconvert                         6.0.7
        nbdime                            2.1.0
        nbformat                          5.0.8
        nest-asyncio                      1.4.1
        notebook                          6.1.4
        numpy                             1.17.4
        oauthlib                          3.1.0
        onetimepass                       1.0.1
        packaging                         20.4
        pamela                            1.0.0
        pandocfilters                     1.4.2
        parso                             0.7.1
        pexpect                           4.8.0
        pickleshare                       0.7.5
        pip                               20.2.2
        pluggy                            0.13.1
        prometheus-client                 0.8.0
        prompt-toolkit                    3.0.8
        ptyprocess                        0.6.0
        pycodestyle                       2.6.0
        pycparser                         2.20
        pycurl                            7.43.0.2
        pydocstyle                        5.1.1
        pyflakes                          2.2.0
        Pygments                          2.7.1
        PyGObject                         3.36.0
        pylint                            2.6.0
        pyOpenSSL                         19.1.0
        pyparsing                         2.4.7
        PyQt5                             5.14.1
        pyrsistent                        0.17.3
        python-dateutil                   2.8.1
        python-editor                     1.0.4
        python-json-logger                2.0.1
        python-jsonrpc-server             0.4.0
        python-language-server            0.35.1
        PyYAML                            5.3.1
        pyzmq                             19.0.2
        requests                          2.24.0
        rope                              0.18.0
        ruamel.yaml                       0.16.12
        ruamel.yaml.clib                  0.2.2
        Send2Trash                        1.5.0
        setuptools                        50.3.1
        sip                               4.19.21
        six                               1.15.0
        smmap                             3.0.4
        snowballstemmer                   2.0.0
        SQLAlchemy                        1.3.20
        swiglpk                           4.65.0
        terminado                         0.9.1
        testpath                          0.4.4
        toml                              0.10.1
        tornado                           6.0.4
        traitlets                         5.0.5
        ujson                             4.0.1
        urllib3                           1.25.10
        veusz                             3.0.1
        wcwidth                           0.2.5
        webencodings                      0.5.1
        wheel                             0.34.2
        wrapt                             1.12.1
        yapf                              0.30.0
krassowski commented 4 years ago

Context menu, see (slightly outdated, yet relevant) gif below:

diagnostics_panel

krassowski commented 4 years ago

Actually, it should have shown up in there..

Screenshot from 2020-10-25 10-23-41

You can access the browser console for logs of interface errors and warnings, see How_to_open_the_devtools_in_your_browser

stefaneidelloth commented 4 years ago

The command also does not show up in context menu of the cell: image

Screenshot of devtool console: image

krassowski commented 4 years ago

Thank you. This is intriguing as there is nothing unexpected in the logs. I am sorry it does not work as expected. Would you mind taking a screenshot of the statusbar item which should look somewhat like that:

Screenshot from 2020-10-25 10-47-23

stefaneidelloth commented 4 years ago

image

I restarted the kernel and got some more output.

image

stefaneidelloth commented 4 years ago

Hm. Today the diagnostics panel works (shows up on Commands Panel). Don't know why. I just cloned some git repository but don't guess that's the reason. I'll let you know if I find out more.

krassowski commented 4 years ago

Is it working consistently well since?

stefaneidelloth commented 4 years ago

Thank you for asking back. Unfortunately not. I could share my screen in a gotomeeting session if that would help to identify the underlying issue.

Edit

The issue might be due to a version conflict of Jedi with xeus-python. After updating Jedi with

pip install -U jedi

it seems to work.

Maybe you can include a version check for jedi if document initialization failes.

python-language-server 0.35.1 requires jedi<0.18.0,>=0.17.0, but you'll have jedi 0.15.2 which is incompatible.

xeus-python 0.8.3 requires jedi<0.16,>=0.15.1, but you'll have jedi 0.17.2 which is incompatible.

I filed a ticket at xeus-python to update jedi dependency

https://github.com/jupyter-xeus/xeus-python/issues/345

krassowski commented 4 years ago

Thanks for the update! Btw, just released python-language-server 0.36 requires jedi 0.17.2.