Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting this error about jupyter_lsp #1082

Closed
hemangjoshi37a opened this issue May 6, 2024 · 2 comments
Closed

getting this error about jupyter_lsp #1082

hemangjoshi37a opened this issue May 6, 2024 · 2 comments

Comments

@hemangjoshi37a
Copy link

(myenv) (base) hemang@hemang-levono-15arr:~$ jupyter server extension list
Config dir: /home/hemang/.jupyter
    jupyter_lsp enabled
    - Validating jupyter_lsp...
      jupyter_lsp 2.2.5 OK

Config dir: /home/hemang/myenv/etc/jupyter
    ipyparallel enabled
    - Validating ipyparallel...
Extension package ipyparallel took 0.3047s to import
A `_jupyter_server_extension_points` function was not found in ipyparallel. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      ipyparallel 8.8.0 OK
    jupyter_lsp enabled
    - Validating jupyter_lsp...
      jupyter_lsp 2.2.5 OK
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
      jupyter_server_terminals 0.5.3 OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 4.1.8 OK
    nbclassic enabled
    - Validating nbclassic...
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      nbclassic 1.0.0 OK
    notebook enabled
    - Validating notebook...
      notebook 7.1.3 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK

Config dir: /usr/local/etc/jupyter
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 4.1.8 OK
    nbclassic enabled
    - Validating nbclassic...
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      nbclassic 1.0.0 OK

(myenv) (base) hemang@hemang-levono-15arr:~$ jupyter server extension enable --user --py jupyter_lsp
Enabling: jupyter_lsp
- Writing config: /home/hemang/.jupyter
    - Validating jupyter_lsp...
      jupyter_lsp  OK
    - Extension successfully enabled.
(myenv) (base) hemang@hemang-levono-15arr:~$ python3.12 -m jupyter notebook
[W 2024-05-06 18:22:32.831 ServerApp] notebook_dir is deprecated, use root_dir
[I 2024-05-06 18:22:33.138 ServerApp] Extension package ipyparallel took 0.2987s to import
[W 2024-05-06 18:22:33.138 ServerApp] A `_jupyter_server_extension_points` function was not found in ipyparallel. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[W 2024-05-06 18:22:34.017 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2024-05-06 18:22:34.019 ServerApp] ipyparallel | extension was successfully linked.
[I 2024-05-06 18:22:34.019 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-06 18:22:34.028 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-06 18:22:34.038 ServerApp] jupyterlab | extension was successfully linked.
[W 2024-05-06 18:22:34.042 NotebookApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2024-05-06 18:22:34.047 ServerApp] ServerApp.password config is deprecated in 2.0. Use PasswordIdentityProvider.hashed_password.
[I 2024-05-06 18:22:34.047 ServerApp] nbclassic | extension was successfully linked.
[W 2024-05-06 18:22:34.050 JupyterNotebookApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2024-05-06 18:22:34.055 ServerApp] notebook | extension was successfully linked.
[W 2024-05-06 18:22:34.061 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_nbextensions_configurator. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2024-05-06 18:22:34.061 ServerApp] jupyter_nbextensions_configurator | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2024-05-06 18:22:34.061 ServerApp] jupyter_nbextensions_configurator | extension was successfully linked.
[W 2024-05-06 18:22:34.063 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_tabnine. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2024-05-06 18:22:34.063 ServerApp] jupyter_tabnine | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2024-05-06 18:22:34.063 ServerApp] jupyter_tabnine | extension was successfully linked.
[I 2024-05-06 18:22:34.063 ServerApp] ipyparallel.nbextension | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2024-05-06 18:22:34.064 ServerApp] ipyparallel.nbextension | extension was successfully linked.
[I 2024-05-06 18:22:34.064 ServerApp] notebook_shim | extension was successfully linked.
[W 2024-05-06 18:22:34.086 ServerApp] WARNING: The Jupyter server is listening on all IP addresses and not using encryption. This is not recommended.
[I 2024-05-06 18:22:34.087 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-06 18:22:34.088 ServerApp] Loading IPython parallel extension
[I 2024-05-06 18:22:34.088 ServerApp] ipyparallel | extension was successfully loaded.
[I 2024-05-06 18:22:34.088 ServerApp] Loading IPython parallel extension
[I 2024-05-06 18:22:34.089 ServerApp] ipyparallel.nbextension | extension was successfully loaded.
[W 2024-05-06 18:22:34.091 ServerApp] jupyter_lsp | extension failed loading with message: TraitError("schema errors:\n\t1 is not one of [2]\nfor:\n{'a-language-server-implementation': {'version': 1, 'argv': ['/absolute/path/to/a-language-server', '--stdio'], 'languages': ['a-language']}}")
    Traceback (most recent call last):
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_server/extension/manager.py", line 360, in load_extension
        extension.load_all_points(self.serverapp)
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_server/extension/manager.py", line 232, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_server/extension/manager.py", line 223, in load_point
        return point.load(serverapp)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_server/extension/manager.py", line 151, in load
        return loader(serverapp)
               ^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_lsp/serverextension.py", line 54, in load_jupyter_server_extension
        manager = nbapp.language_server_manager = LanguageServerManager(parent=nbapp)
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_lsp/manager.py", line 127, in __init__
        super().__init__(**kwargs)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/config/configurable.py", line 116, in __init__
        self.config = config
        ^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 716, in __set__
        self.set(obj, value)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 706, in set
        obj._notify_trait(self.name, old_value, new_value)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 1513, in _notify_trait
        self.notify_change(
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 1525, in notify_change
        return self._notify_observers(change)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 1568, in _notify_observers
        c(event)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 1143, in compatible_observer
        return func(self, change)
               ^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/config/configurable.py", line 232, in _config_changed
        self._load_config(change.new, traits=traits, section_names=section_names)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/config/configurable.py", line 193, in _load_config
        setattr(self, name, deepcopy(config_value))
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 716, in __set__
        self.set(obj, value)
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 690, in set
        new_value = self._validate(obj, value)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/traitlets/traitlets.py", line 722, in _validate
        value = self.validate(obj, value)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/hemang/myenv/lib/python3.12/site-packages/jupyter_lsp/trait_types.py", line 16, in validate
        raise traitlets.TraitError(
    traitlets.traitlets.TraitError: schema errors:
        1 is not one of [2]
    for:
    {'a-language-server-implementation': {'version': 1, 'argv': ['/absolute/path/to/a-language-server', '--stdio'], 'languages': ['a-language']}}
[I 2024-05-06 18:22:34.094 ServerApp] [jupyter_nbextensions_configurator] enabled 0.6.3
[I 2024-05-06 18:22:34.094 ServerApp] jupyter_nbextensions_configurator | extension was successfully loaded.
[I 2024-05-06 18:22:34.095 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[INFO 2024-05-06 18:22:34.095 Tabnine]:  install dir: /home/hemang/myenv/lib/python3.12/site-packages/jupyter_tabnine
[INFO 2024-05-06 18:22:34.095 Tabnine]: Tabnine binary already exists in /home/hemang/myenv/lib/python3.12/site-packages/jupyter_tabnine/binaries/4.159.0/x86_64-unknown-linux-musl/TabNine ignore downloading
[INFO 2024-05-06 18:22:35.935 Tabnine]:  Semantic completion enabled.
[I 2024-05-06 18:22:35.936 ServerApp] jupyter_tabnine | extension was successfully loaded.
[I 2024-05-06 18:22:35.941 LabApp] JupyterLab extension loaded from /home/hemang/myenv/lib/python3.12/site-packages/jupyterlab
[I 2024-05-06 18:22:35.941 LabApp] JupyterLab application directory is /home/hemang/myenv/share/jupyter/lab
[I 2024-05-06 18:22:35.942 LabApp] Extension Manager is 'pypi'.
[I 2024-05-06 18:22:35.998 ServerApp] jupyterlab | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|
                                                                           
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2024-05-06 18:22:36.002 ServerApp] nbclassic | extension was successfully loaded.
[I 2024-05-06 18:22:36.009 ServerApp] notebook | extension was successfully loaded.
[I 2024-05-06 18:22:36.010 ServerApp] Serving notebooks from local directory: /home/hemang
[I 2024-05-06 18:22:36.010 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-06 18:22:36.010 ServerApp] http://localhost:9999/tree
[I 2024-05-06 18:22:36.010 ServerApp]     http://127.0.0.1:9999/tree
[I 2024-05-06 18:22:36.010 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2024-05-06 18:22:39.746 ServerApp] 404 GET /lsp/status?1714999959709 (6cabec7625854e60b7ad5e35d752336f@::1) 33.43ms referer=http://localhost:9999/tree
[W 2024-05-06 18:22:39.770 ServerApp] 404 GET /lsp/status?1714999959765 (6cabec7625854e60b7ad5e35d752336f@::1) 2.14ms referer=http://localhost:9999/tree
[INFO 2024-05-06 18:22:42.968 httpx]: HTTP Request: GET https://pypi.org/pypi/310-notebook/0.1.0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:42.994 httpx]: HTTP Request: GET https://pypi.org/pypi/abirami-hide-code/4.0.5/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.022 httpx]: HTTP Request: GET https://pypi.org/pypi/ai-einblick-prompt/0.1.9/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.187 httpx]: HTTP Request: GET https://pypi.org/pypi/algovera/0.2.0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.289 httpx]: HTTP Request: GET https://pypi.org/pypi/amazon-codeguru-jupyterlab-extension/1.1.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.391 httpx]: HTTP Request: GET https://pypi.org/pypi/amazon-sagemaker-sql-editor/0.1.7/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.475 httpx]: HTTP Request: GET https://pypi.org/pypi/aolney-jupyterlab-blockly-python-extension/0.1.0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.516 httpx]: HTTP Request: GET https://pypi.org/pypi/aolney-jupyterlab-blockly-r-extension/0.1.2/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.598 httpx]: HTTP Request: GET https://pypi.org/pypi/astronbs/0.9.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.699 httpx]: HTTP Request: GET https://pypi.org/pypi/attention-grabber/0.1.3/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.801 httpx]: HTTP Request: GET https://pypi.org/pypi/author-ide-extension/0.2.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:43.827 httpx]: HTTP Request: GET https://pypi.org/pypi/autocompletion/0.1.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.006 httpx]: HTTP Request: GET https://pypi.org/pypi/bodo-jupyterlab/1.9.0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.108 httpx]: HTTP Request: GET https://pypi.org/pypi/bonxai/0.1.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.173 httpx]: HTTP Request: GET https://pypi.org/pypi/cad-viewer-widget/2.0.2/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.200 httpx]: HTTP Request: GET https://pypi.org/pypi/carpo-student/0.0.9/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.227 httpx]: HTTP Request: GET https://pypi.org/pypi/carpo-teacher/0.0.9/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.254 httpx]: HTTP Request: GET https://pypi.org/pypi/cate-jl-ext/0.1.2/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.277 httpx]: HTTP Request: GET https://pypi.org/pypi/catppuccin-jupyterlab/0.2.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.302 httpx]: HTTP Request: GET https://pypi.org/pypi/causalvis/0.1.0a0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.327 httpx]: HTTP Request: GET https://pypi.org/pypi/cell-executed-alert/0.1.2/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.351 httpx]: HTTP Request: GET https://pypi.org/pypi/chapyter/0.3.1/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.376 httpx]: HTTP Request: GET https://pypi.org/pypi/chartfactor-jlab-ext/5.0.7/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.400 httpx]: HTTP Request: GET https://pypi.org/pypi/clouder/0.0.5/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.424 httpx]: HTTP Request: GET https://pypi.org/pypi/codepeers/0.3.3/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.449 httpx]: HTTP Request: GET https://pypi.org/pypi/codex-chat-notebook/0.1.5/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.473 httpx]: HTTP Request: GET https://pypi.org/pypi/cognite-jupyterlab-copilot/3.5.9/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.515 httpx]: HTTP Request: GET https://pypi.org/pypi/cognite-jupyterlab-metrics/0.1.0/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.540 httpx]: HTTP Request: GET https://pypi.org/pypi/cognite-jupyterlab-theme/3.5.7/json "HTTP/1.1 200 OK"
[INFO 2024-05-06 18:22:44.563 httpx]: HTTP Request: GET https://pypi.org/pypi/cs-jupyterlab-git/0.0.3/json "HTTP/1.1 200 OK"
[W 2024-05-06 18:22:50.231 ServerApp] 404 GET /lsp/status?1714999970222 (6cabec7625854e60b7ad5e35d752336f@::1) 1.55ms referer=http://localhost:9999/tree
@krassowski
Copy link
Member

You or your administrator must have mis-configured your installation. By default there is no a-language-server-implementation spec shipped with this extension, but your system - as per your logs - contains it:

    traitlets.traitlets.TraitError: schema errors:
        1 is not one of [2]
    for:
    {'a-language-server-implementation': {'version': 1, 'argv': ['/absolute/path/to/a-language-server', '--stdio'], 'languages': ['a-language']}}

and it contains the spec defined for version 1 whereas the current jupyter-lsp requires version 2 (as the error message is trying to tell you).

It appears that someone copy-pasted the configuration example from https://jupyterlab-lsp.readthedocs.io/en/latest/Configuring.html#language-servers without replacing placeholders -
/absolute/path/to/a-language-server is just an example path, a-language is just placeholder for language name etc. This is not going to work.

You need to find out where the faulty configuration was placed and get it removed. Closing as this is not a bug in jupyter-lsp.

In future, please do not post the same issue in three different repositories (here, jupyterlab and notebook) - this is considered impolite as it forces maintainers of all these projects to spend time reading and analysing your question.

@hemangjoshi37a
Copy link
Author

@krassowski ok thanks for the response and i am considering your feedback about not posting same issues. thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants