-
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
Partial freeze of jupyterlab when typing "pd.read_pickle" #200
Comments
Thank you for the report and very useful insights. It sounds like a race condition... I experienced similar hiccups with the
I hope the workaround helps - until a better solution is available. Please let me know if it works for you. |
Thank you very much for the quick response! A workaround that allows me to continue my ongoing work when things get stuck is perfect for now, great! I'll report back if this workaround should ever fail. Thanks again! |
We're hoping #199 addresses this case by moving as much language server i/o to separate threads which shouldn't block other things happening: stay tuned for frontend/backend releases that include those changes. In addition, we likely need a more fine-grained way to restart a particular server: unfortunately, the most "Lab-native" way of doing this, by hooking into the "Running" sidebar area, isn't available yet on a stable release, but Lab 2.0 is well into its second release candidate, and we'll be tracking progress towards that in #186, but we might need a stop-gap approach for those that can't upgrade for a while even when it does come out. Let's keep this open in the meantime. |
For reference: I am experiencing a very similar issue in a different context: Context
So it seems that this is not tied to a specific JupyterLab version or the OS. It is not always reproducible though, I could get the Lab interface to stop reacting completely with a simple input like this sometimes:
In a longer notebook I can reproduce the error now and on the command line get the following error that originates from
The notebook is then frozen and I cannot recover it from this point. Only a manual abort helps where the extension is then complaining about open files:
|
@asteppke This seems to be a known problem with pyls dependencies:
@stephenkraemer could you |
Thanks for following up! I have jedi == 0.15.2 and parso==0.5.2. My environment was created with conda, then I installed jupyter-lsp with pip. Note: I am a bit behind with the jupyterlab-lsp releases: jupyter-lsp==0.7.0b0 and jupyterlab-lsp==v0.7.1. I will install jupyterlab 2.0 and the newest release of jupyterlab-lsp soon, and report back if something new happens. Maybe interesting: for me, the freeze can (as probably expected) happen with different code fragments. But it does seem that for me it exclusively occurs with pandas top level functions (pd.concat, pd.read etc.). Maybe that's just because I use pandas more often than most other packages though... Thanks a lot! |
Thank you! Yes, I think that the freezes are generally related to auto-completion requests triggered by typing a dot after a module or object name, and not specific to any particular piece of code - but I might be wrong, and the more we know the easier it will be to pin this down, so please continue providing more details if you observe this again. One hypothesis on the origin: if the pyls server is not handling concurrent requests well, i.e. we start autocompletion and in the meantime the user types something which modifies the virtual document the autocompletion starts to operate on a modified document, something goes wrong and brings an error. |
First of all thanks for your great work! This is really cool stuff!
Description
In notebooks beyond moderate size (a few hundred lines of code and minimal output), when I type "pd.read_pickle('path')", the function call is underlined in red, and jupyterlab partially freezes: i) the kernel does not respond anymore ii) the document cannot be saved anymore iii) also other kernels do not respond anymore.
Reproduce
Unfortunately, this happens so randomly that I have no useful reproducible example. If this makes this issue less than helpful, please close it right away! I just wanted to report my current troubles in case it's interesting.
However, I have found that the error can be prevented if one types slowly enough, so that the autocompletion kicks in. Ie: if I type "pd." and then wait until the autocompletion pop-up appears, the error will not happen.
Expected behavior
"pd.read_pickle" is correctly recognized as legitimate code and jupyterlab does not freeze
Context
jupyter-lsp
version: 0.7.0b0@krassowski/jupyterlab-lsp
version: 0.7.1Troubleshoot Output
If you think this is worth following up upon, I'd be happy to try and copy-paste log messages when the error appears next!
The text was updated successfully, but these errors were encountered: