KeyError when opening new notebook
See original GitHub issueI followed the steps outlined in readme, but it seems that pyls can’t find source files I get this error:
Example Server: 2019-09-12 10:35:37,818 UTC - ERROR - pyls_jsonrpc.endpoint - Failed to handle notification textDocument/didChange: {'textDocument': {'uri': 'file:///test.ipynb.python', 'version': 1}, 'contentChanges': [{'text': 'import pandas as pd\n\n\npd.\n'}]}
Traceback (most recent call last): File "/usr/local/miniconda3/envs/notebook/lib/python3.7/site-packages/pyls_jsonrpc/endpoint.py", line 142, in _handle_notification
handler_result = handler(params)
File "/usr/local/miniconda3/envs/notebook/lib/python3.7/site-packages/pyls_jsonrpc/dispatchers.py", line 23, in handler return method(**(params or {}))
File "/usr/local/miniconda3/envs/notebook/lib/python3.7/site-packages/pyls/python_ls.py", line 281, in m_text_document__did_change
version=textDocument.get('version') File "/usr/local/miniconda3/envs/notebook/lib/python3.7/site-packages/pyls/workspace.py", line 77, in update_document
self._docs[doc_uri].apply_change(change)
KeyError: 'file:///test.ipynb.python'
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
python - Key Error - Jupyter Notebook - Stack Overflow
I have started to learn pandas. I am using Jupyter notebook. I have imported the test data file -Weather I read the file...
Read more >Key error on Jupyter Notebook · Issue #557 - GitHub
from ipyleaflet import Map, Velocity, TileLayer, basemaps import xarray as xr import os if not os.path.exists('wind-global.nc'): url ...
Read more >How to fix Python KeyError Exceptions in simple steps?
A Python KeyError is raised when you try to access an invalid key in a dictionary. In simple terms, when you see a...
Read more >KeyError: 'loggers' when trying to open Jupyter - PyXLL
When you try to open a Jupyter notebook if you get the following error this this article explains what you need to do...
Read more >keyerror in Python – How to Fix Dictionary Error
When working with dictionaries in Python, a KeyError gets raised when you try to access an item that doesn't exist in a Python...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. It’s just that pyls was not written with supporting notebooks in mind, if the extension otherwise works as expected then there is nothing to worry about (right now) - please treat it as a false positive, unless you experience other issues (i.e. some functionalities we already support not working as expected).
I will work on fixing this message later on.
Hi, thank you for your work on this extension. I think this error might have resurfaced - I’m getting the following error on two separate machines:
Screenshot from developer console: