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

Hover on notebook fails #262

Closed
karthiknadig opened this issue Mar 7, 2023 · 3 comments · Fixed by #276
Closed

Hover on notebook fails #262

karthiknadig opened this issue Mar 7, 2023 · 3 comments · Fixed by #276
Labels
enhancement New feature or request

Comments

@karthiknadig
Copy link
Contributor

karthiknadig commented Mar 7, 2023

Steps to reproduce:

  1. Install VS Code and ms-python.python extension
  2. Set "Python: Language Server" == Jedi
  3. Use an .py or .ipynb file
  4. Check notebook-languageserver or Extension Host Output
notebook-languageserver logs:
ERROR:pygls.protocol:Failed to handle request 16 textDocument/hover HoverParams(text_document=TextDocumentIdentifier(uri='file:///Users/joshrichardson/src/josh-test-project/_NotebookConcat_6f44cb10b80a.py'), position=0:0, work_done_token=None)
Traceback (most recent call last):
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/pygls/protocol.py", line 337, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/pygls/protocol.py", line 261, in _execute_request
    self._send_response(msg_id, handler(params))
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/jedi_language_server/server.py", line 378, in hover
    jedi_script.help(
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/jedi/api/helpers.py", line 484, in wrapper
    raise ValueError('`column` parameter (%d) is not in a valid range '
ValueError: `column` parameter (1) is not in a valid range (0-0) for line 1 ('').
ERROR:pygls.protocol:Failed to handle request 21 textDocument/documentSymbol DocumentSymbolParams(text_document=TextDocumentIdentifier(uri='file:///'), work_done_token=None, partial_result_token=None)
Traceback (most recent call last):
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/pygls/protocol.py", line 337, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/pygls/protocol.py", line 261, in _execute_request
    self._send_response(msg_id, handler(params))
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/jedi_language_server/server.py", line 433, in document_symbol
    jedi_script = jedi_utils.script(server.project, document)
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/jedi_language_server/jedi_utils.py", line 108, in script
    return Script(code=document.source, path=document.path, project=project)
  File "/Users/joshrichardson/.vscode-insiders/extensions/ms-python.python-2023.5.10661006/pythonFiles/lib/jedilsp/pygls/workspace.py", line 288, in source
    with io.open(self.path, 'r', encoding='utf-8') as f:
IsADirectoryError: [Errno 21] Is a directory: '/'

reference: microsoft/vscode-python#20811

@pappasam
Copy link
Owner

pappasam commented Mar 8, 2023

This issue is requesting ipynb support.

@dimbleby
Copy link
Contributor

dimbleby commented Mar 12, 2023

or is it just asking that 1a75efb be reverted?

I took a look at what was going on there and I believe that the underlying jedi issue is davidhalter/jedi#1923 (of course it might take some time for that fix to reach a release)

@davidhalter
Copy link

Will release very soon for various reasons. Expect a release in the next few weeks.

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

Successfully merging a pull request may close this issue.

4 participants