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

Make this repo work with python and jupyter extensions #30

Open
MarcSkovMadsen opened this issue Jan 15, 2022 · 5 comments
Open

Make this repo work with python and jupyter extensions #30

MarcSkovMadsen opened this issue Jan 15, 2022 · 5 comments

Comments

@MarcSkovMadsen
Copy link

Making the Python and Jupyter extensions work nicely on code-server is not easy. You can see that from other issues in this repo and from the code-server github issues list. You need specific versions of code-server and specific versions of the python and jupyter extensions.

My suggestion would be to pin versions of code-server, python extension and jupyter extension to something that works.

Would be really helpful.

(Unfortunately I don't know recent version that work well together. I'm trying to find them.)

@betatim
Copy link
Owner

betatim commented Jan 17, 2022

That would be a great contribution. I made this repo as an example but I don't really use VS Code (or any of its extensions) so my experience on how to make things work is limited :-/ If you figure something out and can open a PR that would be great.

@benz0li
Copy link

benz0li commented Mar 3, 2022

@MarcSkovMadsen The Python and Jupyter extension work fine with code-server. But yes, up to v3.12.0 it was difficult to find a compatible set.

You may give my reference deployment at https://demo.jupyter.b-data.ch another try which serves JupyterHub and JupyterLab + code-server.

Most issues are related to either coder/code-server#4395 (comment) or coder/code-server#4689 (comment), i.e. trying to run it locally without HTTPS.


Run it locally with docker

Initial command:

docker run -it --rm -p 8888:8888 -v $PWD:/home/jovyan -e GEN_CERT=yes registry.gitlab.b-data.ch/jupyterlab/r/verse

Subsequent command:

docker run -it --rm -p 8888:8888 -v $PWD:/home/jovyan registry.gitlab.b-data.ch/jupyterlab/r/verse start-notebook.sh --NotebookApp.certfile=~/.local/share/jupyter/notebook.pem

Run the initial command in an empty directory so that the container populates it. Visit https://127.0.0.1:8888/lab?token=<token> in a browser to load JupyterLab.

@enryH
Copy link

enryH commented Jul 9, 2022

I forked the repository and tried to start it using mybinder (direk-link).

and now I see errors:

Traceback (most recent call last):
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/run-jedi-language-server.py", line 9, in <module>
    from jedi_language_server.cli import cli
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/jedi_language_server/cli.py", line 7, in <module>
    from .server import SERVER
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/jedi_language_server/server.py", line 14, in <module>
    from pydantic import ValidationError
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/pydantic/__init__.py", line 2, in <module>
    from . import dataclasses
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/pydantic/dataclasses.py", line 3, in <module>
    from .class_validators import gather_all_validators
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/pydantic/class_validators.py", line 8, in <module>
    from .errors import ConfigError
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/pydantic/errors.py", line 5, in <module>
    from .typing import display_as_type
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/pydantic/typing.py", line 23, in <module>
    from typing_extensions import Annotated, Literal
  File "/srv/conda/envs/notebook/share/code-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/jedilsp/typing_extensions.py", line 159, in <module>
    class _FinalForm(typing._SpecialForm, _root=True):
AttributeError: module 'typing' has no attribute '_SpecialForm'
[Error - 3:04:49 PM] The Python Jedi server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 3:04:49 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097

I don't get the error when I use the original link. might the images be build differently lately?

@enryH
Copy link

enryH commented Jul 9, 2022

The most striking differencens:

  • code-server (betatim docker container): 4.1 to 4.5 on fork with rebuild container
  • jupyter-server also changed
  • jupyter-server-proxy stayed the same
    image
    image

enryH pushed a commit to enryH/snakemake-tutorial that referenced this issue Jul 9, 2022
@enryH
Copy link

enryH commented Jul 9, 2022

It works if I set code-server to version 4.1.0 (different project):
enryH@85d0280

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

4 participants