-
Notifications
You must be signed in to change notification settings - Fork 148
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
Python LSP connecting #93
Comments
Hi @dclong thanks for opening the issue. We are working on making this easier to troubleshoot for users. In the meantime, if you could provide us with the output of your terminal (like the place from where you started the jupyter lab) and from the browser console (usually pressing F12 in your browser opens it), we may be able to help further. |
Hi, I'm facing the same issue. Here's my console output:
|
The 404 error hints on an installation problem. Did you install and enable the server-side extension?
@bollwyvl 1ca2510 removed this command from README, wheat it the rationale here? Should it get auto-enabled by default? If yes, it did not work for me and it may not be working for @shreyasgm above. |
Yes, the jupyter_notebook_config.json we ship in etc should get picked up.
Thought we were testing that...
…On Tue, Nov 12, 2019, 14:50 M. Krassowski ***@***.***> wrote:
The 404 error hints on an installation problem. Did you install and enable
the server-side extension?
pip install jupyter-lsp
jupyter serverextension enable --sys-prefix --py jupyter_lsp
@bollwyvl <https://github.com/bollwyvl> 1ca2510
<krassowski@1ca2510>
removed this command from README, wheat it the rationale here? Should it
get auto-enabled by default? If yes, it did not work for me and it may not
be working for @shreyasgm <https://github.com/shreyasgm> above.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/krassowski/jupyterlab-lsp/issues/93?email_source=notifications&email_token=AAALCRCE5S2JOK2YZFXZNXDQTMCIZA5CNFSM4JIYFXHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED3WT7Y#issuecomment-553085439>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALCRC422VBETYQSFGIXLTQTMCIZANCNFSM4JIYFXHA>
.
|
Thanks for the tip on enabling the server extension - I hadn't done that, and so I did a fresh reinstall including the server extension. That seems to have fixed the issue for now. |
Great! @bollwyvl thank you for the pointer to the file! I do not see this file in git. Is it autogenerated or did we forget to add it? It is mentioned in two files ( However, we got |
Right, my bad. It is the other one you mention. The approach is copied from: It's a really long story how it came to be, but it is actually documented, and much preferable to the bad old days (when it works). It actually is getting tested in CI, as there is no other place where we call |
Yeah, i just tested it out in a conda env:
|
@krassowski Below is the console message of JupyterHub server but it deosn't seem to have LSP related logging. I have a JupyterHub server without jupyterlab-lsp installed and then I installed jupyterlab-lsp following the instructions (including enabling jupyter-lsp manually). Does jupyterlab-lsp work only when it is installed before the JupyterLab/Hub server is launched?
|
Yes, it should be installed before the start of the server. Simple restart should help. I do not see anything specific either (which indicates that the server extension was not available or did not get loaded for some reason during server startup), but such logs are generally useful - thanks! |
@krassowski Is there a command to force restarting jupyterlab-lsp? The reason is that I'm using JupyterHub via Docker. I couldn't simply restart the Docker container. I have to rebuild the Docker image first. Generally speaking, I try a JupyterLab extension before I build it into my Docker images. Other users that leverage Docker might do the same. Such a restart command might be very helpful for those users. |
It starts in the same process as the notebook server, so that it can add
routes to and be served on the same ports as the kernels, etc... There
isn't really a good way to serverextensions after the fact if the notebook
server is the main docker command (or beneath tini). This is fairly normal
(that's how jupyterlab works).
We could potentially allow a POST to redetect language servers, but it
would still have to be available at notebook start time.
…On Fri, Nov 15, 2019, 16:44 Ben Chuanlong Du ***@***.***> wrote:
@krassowski <https://github.com/krassowski> Is there a command to force
restarting jupyterlab-lsp? The reason is that I'm using JupyterHub via
Docker. I couldn't simply restart the Docker container. I have to rebuild
the Docker image first. Generally speaking, I try a JupyterLab extension
before I build it into my Docker images. Other users that leverage Docker
might do the same. Such a restart command might be very helpful for those
users.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/krassowski/jupyterlab-lsp/issues/93?email_source=notifications&email_token=AAALCRAZP2SJX554CKIKQ5DQT4J4NA5CNFSM4JIYFXHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGZ35Q#issuecomment-554540534>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALCRGPOV3T7KNP6L2ZP73QT4J4NANCNFSM4JIYFXHA>
.
|
@dclong I googled a bit and indeed it seems that you will need to rebuild the Docker image. This SO thread touches on the installation of notebook extensions for JupyterHub but there is no solution for in-flight installation (or JupyterHub restart) proposed. If there was only a way to restart JupyterHub inside of the container... but you would probably need to ask in the JupyterHub repo. The hot reloading of notebooks code was proposed in jupyter/notebook#4795 but this PR stalled (even though it was approved). There was a discussion on discourse linking to this PR recently. @bollwyvl bringing more attention to it might be in-line with your vision of developing jupyter inside of JupyterLab -depending on how far you wish to take it ;) Something about hot-reloading was mentioned in jupyterlab/jupyterlab#7469 but it seems that discussion in this thread went more into the JS/webpack side of things. |
@krassowski Thank you very much for the detailed information! It's not really a problem for me to rebuild the Docker image. It's only a nice-to-have feature if we can dynamically reload/restart the extension. I will try to install jupyterlab-lsp in my Docker image and check whether it works and update the thread here. |
@dclong thanks, looking forward to hearing back from you! @bollwyvl The the docs section that you linked to for Automatically enabling a server extension mentions that this is "New in Notebook 5.3". I think that it is possible to have JupyterLab 1.1 with notebook 5.2 or older - this might be why it fails sometimes (but not when you tried to do a clean install which uses the latest version). Our |
Well, we're coming up on two years since that release of notebook, and jupyterlab 1.x requires It's great to try to support older versions, but as long as it's just us two committers, doing active upstream PRs while trying to create previously unseen features, I don't think we have the bandwidth to code around older stuff. Even python 3.5 will probably be dropped from most of the scientific computing ecosystem next month. |
@krassowski |
Thanks again for testing out jupyter(lab)-lsp! We've talked about what a sourcegraph service for JupyterHub would look like... aside from leaving the necessary hooks open, it's probably out of scope to take a stab at it in this repository, though, but we'll definitely want to make sure we can handle stuff at scale. I sure would like to have my whole organization's internal code library at my fingertips inside a notebook! Another exciting organization-level thing would be database-level introspection, such as SQL. |
I couldn't get jupyterlab-lsp to work for me. The status bar says Python LSP is connecting all the time. I wonder is this due to some permission issue?
The text was updated successfully, but these errors were encountered: