-
Notifications
You must be signed in to change notification settings - Fork 154
Description
Description
When use pyright as the language server, jump-to-definition functionality is broken, with error message

Even for files inside the content root.
Reproduce
-
Firstly, I created a new conda environment, and used the following commands to initialize the environment:
conda create -n jlab-test --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab conda activate jlab-test conda install -c conda-forge jupyterlab-lsp=5.0.0 conda install --channel conda-forge nodejs
Then, inside the directory where I am going to start jupyterlab, I installed pyright using
npm init npm install --save-dev pyright
to install pyright.
-
Then in the same directory, start jupyter lab by
jupyter lab
Inside the browser, visit localhost:8888, in the Settings panel we can verify that pyright has been recognized and activated:
-
create a file named
mymodule.py, inside which are the linesdef hello(name: str) -> str: print('Hello,', name) return name
Then create a file named
test.py, inside which are the linesfrom mymodule import hello name = hello('Jack')
When hovering on variable
nameand pressCTRL, we can see that pyright are giving hints correctly:

-
However, the jump to definition functionality is broken. Inside
test.pyif we hover on the functionhelloand pressAltkey, an error pops up:File Load Error for mymodule.py .lsp_symlink/e:tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py is outside root contents directory
How I diagonized the issue
I opened the browser developer tools and tried to monitor the network activities. I discovered that jupyterlab is using websocket to communicate to the language server. When I activate jump-to-definition, a JSON of the following form will be sent:
{"jsonrpc":"2.0","id":6,"method":"textDocument/definition","params":{"textDocument":{"uri":"file:///e:/tmp/mre-jupyterlab-pyright-jump-to-def/test.py"},"position":{"line":0,"character":24}}}and pyright gives the response
{"jsonrpc":"2.0","id":6,"result":[{"uri":"file:///e%3A/tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py","range":{"start":{"line":0,"character":4},"end":{"line":0,"character":9}}}]}The uri of the file is correct. But it seems that jupyterlab-lsp's frontend cannot parse it, and gave the wrong path .lsp_symlink/e:tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py instead of the correct one.
I know that jupyter server forbids access to files outside the content root. However, mymodule.py is well inside the content root.
I also tested the jump-to-definition functionality using python-lsp-server language server. The jump behavior is good. However, the received JSON is a bit different from python-lsp-server:
{"jsonrpc":"2.0","id":110,"result":[{"uri":"file:\/\/\/e:\/tmp\/mre-jupyterlab-pyright-jump-to-def\/mymodule.py", ...}]} I guess, but am not sure if this uri mismatch is the cause of the problem.
Expected behavior
I expect the jump to definition functionality works for files that is inside the project content root.
Context
- Operating System and version: Windows 10
- Browser and version: Edge 118.0.2088.69
- JupyterLab version: 4.0.7
- Language server and version: pyright 1.1.333
Required: installed server extensions
Config dir: C:\Users\user\.jupyterConfig dir: D:\Programs\miniconda3\envs\jlab-test\etc\jupyter
jupyter_lsp enabled
- Validating jupyter_lsp...
Package jupyter_lsp took 0.0229s to import
A_jupyter_server_extension_pointsfunction was not found in jupyter_lsp. Inst
ead, a_jupyter_server_extension_pathsfunction was found and will be used for
now. This function name will be deprecated in future releases of Jupyter Server
.
jupyter_lsp 2.2.0 ok
jupyter_server_terminals enabled
- Validating jupyter_server_terminals...
Package jupyter_server_terminals took 0.0103s to import
jupyter_server_terminals 0.4.4 ok
jupyterlab enabled
- Validating jupyterlab...
Package jupyterlab took 0.1279s to import
jupyterlab 4.0.7 ok
notebook_shim enabled
- Validating notebook_shim...
Package notebook_shim took 0.0001s to import
A_jupyter_server_extension_pointsfunction was not found in notebook_shim. In
stead, a_jupyter_server_extension_pathsfunction was found and will be used f
or now. This function name will be deprecated in future releases of Jupyter Serv
er.
notebook_shim okConfig dir: C:\ProgramData\jupyter
Required: installed lab extensions
JupyterLab v4.0.7
D:\Programs\miniconda3\envs\jlab-test\share\jupyter\labextensions
jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments)
@jupyter-lsp/jupyterlab-lsp v5.0.0 enabled ok (python, jupyterlab-lsp)
The following extensions are outdated:
jupyterlab_pygments
Consider checking if an update is available for these packages.
Disabled extensions:
@jupyterlab/completer-extension:base-service
@jupyterlab/fileeditor-extension:language-server
@jupyterlab/lsp-extension:settings
@jupyterlab/notebook-extension:language-server
Troubleshoot Output
sys.path:
D:\Programs\miniconda3\envs\jlab-test\Scripts
D:\Programs\miniconda3\envs\jlab-test\python310.zip
D:\Programs\miniconda3\envs\jlab-test\DLLs
D:\Programs\miniconda3\envs\jlab-test\lib
D:\Programs\miniconda3\envs\jlab-test
D:\Programs\miniconda3\envs\jlab-test\lib\site-packages
D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\win32
D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\win32\lib
D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\Pythonwin
sys.executable:
D:\Programs\miniconda3\envs\jlab-test\python.exe
sys.version:
3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:01:37) [MSC v
.1935 64 bit (AMD64)]
platform.platform():
Windows-10-10.0.19045-SP0
where jupyter:
D:\Programs\miniconda3\envs\jlab-test\Scripts\jupyter.exe
pip list:
Package Version
----------------------------- ------------
anyio 4.0.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.1.0
Babel 2.13.1
backcall 0.2.0
backports.functools-lru-cache 1.6.5
beautifulsoup4 4.12.2
bleach 6.1.0
Brotli 1.1.0
cached-property 1.5.2
certifi 2023.7.22
cffi 1.16.0
charset-normalizer 3.3.1
colorama 0.4.6
comm 0.1.4
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
exceptiongroup 1.1.3
executing 1.2.0
fastjsonschema 2.18.1
fqdn 1.5.1
idna 3.4
importlib-metadata 6.8.0
importlib-resources 6.1.0
ipykernel 6.26.0
ipython 8.16.1
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.2
json5 0.9.14
jsonpointer 2.4
jsonschema 4.19.1
jsonschema-specifications 2023.7.1
jupyter_client 8.5.0
jupyter_core 5.4.0
jupyter-events 0.8.0
jupyter-lsp 2.2.0
jupyter_server 2.9.1
jupyter_server_terminals 0.4.4
jupyterlab 4.0.7
jupyterlab-lsp 5.0.0
jupyterlab-pygments 0.2.2
jupyterlab_server 2.25.0
MarkupSafe 2.1.3
matplotlib-inline 0.1.6
mistune 3.0.1
nbclient 0.8.0
nbconvert 7.9.2
nbformat 5.9.2
nest-asyncio 1.5.8
notebook_shim 0.2.3
overrides 7.4.0
packaging 23.2
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
pip 23.3.1
pkgutil_resolve_name 1.3.10
platformdirs 3.11.0
prometheus-client 0.17.1
prompt-toolkit 3.0.39
psutil 5.9.5
pure-eval 0.2.2
pycparser 2.21
Pygments 2.16.1
PySocks 1.7.1
python-dateutil 2.8.2
python-json-logger 2.0.7
pytz 2023.3.post1
pywin32 306
pywinpty 2.0.12
PyYAML 6.0.1
pyzmq 25.1.1
referencing 0.30.2
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.10.6
Send2Trash 1.8.2
setuptools 68.2.2
six 1.16.0
sniffio 1.3.0
soupsieve 2.5
stack-data 0.6.2
terminado 0.15.0
tinycss2 1.2.1
tomli 2.0.1
tornado 6.3.3
traitlets 5.12.0
types-python-dateutil 2.8.19.14
typing_extensions 4.8.0
typing-utils 0.1.0
uri-template 1.3.0
urllib3 2.0.7
wcwidth 0.2.8
webcolors 1.13
webencodings 0.5.1
websocket-client 1.6.4
wheel 0.41.2
win-inet-pton 1.1.0
zipp 3.17.0
conda list:
# packages in environment at D:\Programs\miniconda3\envs\jlab-test:
#
# Name Version Build Channel
anyio 4.0.0 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py310h8d17308_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
babel 2.13.1 pyhd8ed1ab_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-f
orge
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py310h00ffb61_1 conda-forge
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2023.7.22 h56e8100_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py310h8d17308_0 conda-forge
charset-normalizer 3.3.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.1.4 pyhd8ed1ab_0 conda-forge
debugpy 1.8.0 py310h00ffb61_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.8.0 pyha770c72_0 conda-forge
importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge
importlib_resources 6.1.0 pyhd8ed1ab_0 conda-forge
ipykernel 6.26.0 pyha63f2e9_0 conda-forge
ipython 8.16.1 pyh5737063_0 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
json5 0.9.14 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py310h5588dad_3 conda-forge
jsonschema 4.19.1 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.19.1 pyhd8ed1ab_0 conda-f
orge
jupyter-lsp 2.2.0 pyhd8ed1ab_0 conda-forge
jupyter_client 8.5.0 pyhd8ed1ab_0 conda-forge
jupyter_core 5.4.0 py310h5588dad_0 conda-forge
jupyter_events 0.8.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.9.1 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyterlab 4.0.7 pyhd8ed1ab_0 conda-forge
jupyterlab-lsp 5.0.0 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.25.0 pyhd8ed1ab_0 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libsodium 1.0.18 h8d14728_1 conda-forge
libsqlite 3.43.2 hcfcfb64_0 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
markupsafe 2.1.3 py310h8d17308_1 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
mistune 3.0.1 pyhd8ed1ab_0 conda-forge
nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.9.2 pyhd8ed1ab_0 conda-forge
nbformat 5.9.2 pyhd8ed1ab_0 conda-forge
nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge
nodejs 20.8.1 h57928b3_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
openssl 3.1.4 hcfcfb64_0 conda-forge
overrides 7.4.0 pyhd8ed1ab_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 23.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 3.11.0 pyhd8ed1ab_0 conda-forge
prometheus_client 0.17.1 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.39 pyha770c72_0 conda-forge
prompt_toolkit 3.0.39 hd8ed1ab_0 conda-forge
psutil 5.9.5 py310h8d17308_1 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.16.1 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyh0701188_6 conda-forge
python 3.10.13 h4de0772_0_cpython conda-fo
rge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.18.1 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.10 4_cp310 conda-forge
pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge
pywin32 306 py310h00ffb61_2 conda-forge
pywinpty 2.0.12 py310h00ffb61_0 conda-forge
pyyaml 6.0.1 py310h8d17308_1 conda-forge
pyzmq 25.1.1 py310h2849c00_2 conda-forge
referencing 0.30.2 pyhd8ed1ab_0 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.10.6 py310h87d50f1_0 conda-forge
send2trash 1.8.2 pyh08f2357_0 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
terminado 0.15.0 py310h5588dad_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.13 hcfcfb64_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.3.3 py310h8d17308_1 conda-forge
traitlets 5.12.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge
typing-extensions 4.8.0 hd8ed1ab_0 conda-forge
typing_extensions 4.8.0 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.0.7 pyhd8ed1ab_0 conda-forge
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
wcwidth 0.2.8 pyhd8ed1ab_0 conda-forge
webcolors 1.13 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.6.4 pyhd8ed1ab_0 conda-forge
wheel 0.41.2 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge
winpty 0.4.3 4 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
zeromq 4.3.5 h63175ca_0 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
conda env:
name: jlab-test
channels:
- conda-forge
- defaults
dependencies:
- anyio=4.0.0=pyhd8ed1ab_0
- argon2-cffi=23.1.0=pyhd8ed1ab_0
- argon2-cffi-bindings=21.2.0=py310h8d17308_4
- arrow=1.3.0=pyhd8ed1ab_0
- asttokens=2.4.1=pyhd8ed1ab_0
- async-lru=2.0.4=pyhd8ed1ab_0
- attrs=23.1.0=pyh71513ae_1
- babel=2.13.1=pyhd8ed1ab_0
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=pyhd8ed1ab_3
- backports.functools_lru_cache=1.6.5=pyhd8ed1ab_0
- beautifulsoup4=4.12.2=pyha770c72_0
- bleach=6.1.0=pyhd8ed1ab_0
- brotli-python=1.1.0=py310h00ffb61_1
- bzip2=1.0.8=h8ffe710_4
- ca-certificates=2023.7.22=h56e8100_0
- cached-property=1.5.2=hd8ed1ab_1
- cached_property=1.5.2=pyha770c72_1
- certifi=2023.7.22=pyhd8ed1ab_0
- cffi=1.16.0=py310h8d17308_0
- charset-normalizer=3.3.1=pyhd8ed1ab_0
- colorama=0.4.6=pyhd8ed1ab_0
- comm=0.1.4=pyhd8ed1ab_0
- debugpy=1.8.0=py310h00ffb61_1
- decorator=5.1.1=pyhd8ed1ab_0
- defusedxml=0.7.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- exceptiongroup=1.1.3=pyhd8ed1ab_0
- executing=1.2.0=pyhd8ed1ab_0
- fqdn=1.5.1=pyhd8ed1ab_0
- idna=3.4=pyhd8ed1ab_0
- importlib-metadata=6.8.0=pyha770c72_0
- importlib_metadata=6.8.0=hd8ed1ab_0
- importlib_resources=6.1.0=pyhd8ed1ab_0
- ipykernel=6.26.0=pyha63f2e9_0
- ipython=8.16.1=pyh5737063_0
- isoduration=20.11.0=pyhd8ed1ab_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.2=pyhd8ed1ab_1
- json5=0.9.14=pyhd8ed1ab_0
- jsonpointer=2.4=py310h5588dad_3
- jsonschema=4.19.1=pyhd8ed1ab_0
- jsonschema-specifications=2023.7.1=pyhd8ed1ab_0
- jsonschema-with-format-nongpl=4.19.1=pyhd8ed1ab_0
- jupyter-lsp=2.2.0=pyhd8ed1ab_0
- jupyter_client=8.5.0=pyhd8ed1ab_0
- jupyter_core=5.4.0=py310h5588dad_0
- jupyter_events=0.8.0=pyhd8ed1ab_0
- jupyter_server=2.9.1=pyhd8ed1ab_0
- jupyter_server_terminals=0.4.4=pyhd8ed1ab_1
- jupyterlab=4.0.7=pyhd8ed1ab_0
- jupyterlab-lsp=5.0.0=pyhd8ed1ab_0
- jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
- jupyterlab_server=2.25.0=pyhd8ed1ab_0
- libffi=3.4.2=h8ffe710_5
- libsodium=1.0.18=h8d14728_1
- libsqlite=3.43.2=hcfcfb64_0
- libzlib=1.2.13=hcfcfb64_5
- markupsafe=2.1.3=py310h8d17308_1
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- mistune=3.0.1=pyhd8ed1ab_0
- nbclient=0.8.0=pyhd8ed1ab_0
- nbconvert-core=7.9.2=pyhd8ed1ab_0
- nbformat=5.9.2=pyhd8ed1ab_0
- nest-asyncio=1.5.8=pyhd8ed1ab_0
- nodejs=20.8.1=h57928b3_0
- notebook-shim=0.2.3=pyhd8ed1ab_0
- openssl=3.1.4=hcfcfb64_0
- overrides=7.4.0=pyhd8ed1ab_0
- packaging=23.2=pyhd8ed1ab_0
- pandocfilters=1.5.0=pyhd8ed1ab_0
- parso=0.8.3=pyhd8ed1ab_0
- pickleshare=0.7.5=py_1003
- pip=23.3.1=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- platformdirs=3.11.0=pyhd8ed1ab_0
- prometheus_client=0.17.1=pyhd8ed1ab_0
- prompt-toolkit=3.0.39=pyha770c72_0
- prompt_toolkit=3.0.39=hd8ed1ab_0
- psutil=5.9.5=py310h8d17308_1
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pygments=2.16.1=pyhd8ed1ab_0
- pysocks=1.7.1=pyh0701188_6
- python=3.10.13=h4de0772_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python-fastjsonschema=2.18.1=pyhd8ed1ab_0
- python-json-logger=2.0.7=pyhd8ed1ab_0
- python_abi=3.10=4_cp310
- pytz=2023.3.post1=pyhd8ed1ab_0
- pywin32=306=py310h00ffb61_2
- pywinpty=2.0.12=py310h00ffb61_0
- pyyaml=6.0.1=py310h8d17308_1
- pyzmq=25.1.1=py310h2849c00_2
- referencing=0.30.2=pyhd8ed1ab_0
- requests=2.31.0=pyhd8ed1ab_0
- rfc3339-validator=0.1.4=pyhd8ed1ab_0
- rfc3986-validator=0.1.1=pyh9f0ad1d_0
- rpds-py=0.10.6=py310h87d50f1_0
- send2trash=1.8.2=pyh08f2357_0
- setuptools=68.2.2=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sniffio=1.3.0=pyhd8ed1ab_0
- soupsieve=2.5=pyhd8ed1ab_1
- stack_data=0.6.2=pyhd8ed1ab_0
- terminado=0.15.0=py310h5588dad_0
- tinycss2=1.2.1=pyhd8ed1ab_0
- tk=8.6.13=hcfcfb64_0
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.3.3=py310h8d17308_1
- traitlets=5.12.0=pyhd8ed1ab_0
- types-python-dateutil=2.8.19.14=pyhd8ed1ab_0
- typing-extensions=4.8.0=hd8ed1ab_0
- typing_extensions=4.8.0=pyha770c72_0
- typing_utils=0.1.0=pyhd8ed1ab_0
- tzdata=2023c=h71feb2d_0
- ucrt=10.0.22621.0=h57928b3_0
- uri-template=1.3.0=pyhd8ed1ab_0
- urllib3=2.0.7=pyhd8ed1ab_0
- vc=14.3=h64f974e_17
- vc14_runtime=14.36.32532=hdcecf7f_17
- vs2015_runtime=14.36.32532=h05e6639_17
- wcwidth=0.2.8=pyhd8ed1ab_0
- webcolors=1.13=pyhd8ed1ab_0
- webencodings=0.5.1=pyhd8ed1ab_2
- websocket-client=1.6.4=pyhd8ed1ab_0
- wheel=0.41.2=pyhd8ed1ab_0
- win_inet_pton=1.1.0=pyhd8ed1ab_6
- winpty=0.4.3=4
- xz=5.2.6=h8d14728_0
- yaml=0.2.5=h8ffe710_2
- zeromq=4.3.5=h63175ca_0
- zipp=3.17.0=pyhd8ed1ab_0
prefix: D:\Programs\miniconda3\envs\jlab-test
Command Line Output
[W 2023-10-27 11:53:23.527 ServerApp] ServerApp.password config is deprecated in
2.0. Use PasswordIdentityProvider.hashed_password.
[I 2023-10-27 11:53:23.541 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-10-27 11:53:23.564 ServerApp] Package jupyter_lsp took 0.0226s to import
[W 2023-10-27 11:53:23.564 ServerApp] A `_jupyter_server_extension_points` funct
ion was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` f
unction was found and will be used for now. This function name will be deprecate
d in future releases of Jupyter Server.
[I 2023-10-27 11:53:23.577 ServerApp] Package jupyter_server_terminals took 0.01
26s to import
[I 2023-10-27 11:53:23.578 ServerApp] Package notebook_shim took 0.0000s to impo
rt
[W 2023-10-27 11:53:23.578 ServerApp] A `_jupyter_server_extension_points` funct
ion was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths`
function was found and will be used for now. This function name will be depreca
ted in future releases of Jupyter Server.
[I 2023-10-27 11:53:23.579 ServerApp] jupyter_lsp | extension was successfully l
inked.
[I 2023-10-27 11:53:23.587 ServerApp] jupyter_server_terminals | extension was s
uccessfully linked.
[I 2023-10-27 11:53:23.597 ServerApp] jupyterlab | extension was successfully li
nked.
[I 2023-10-27 11:53:23.941 ServerApp] notebook_shim | extension was successfully
linked.
[I 2023-10-27 11:53:23.971 ServerApp] notebook_shim | extension was successfully
loaded.
[I 2023-10-27 11:53:23.973 ServerApp] jupyter_lsp | extension was successfully l
oaded.
[I 2023-10-27 11:53:23.974 ServerApp] jupyter_server_terminals | extension was s
uccessfully loaded.
[I 2023-10-27 11:53:23.978 LabApp] JupyterLab extension loaded from D:\Programs\
miniconda3\envs\jlab-test\lib\site-packages\jupyterlab
[I 2023-10-27 11:53:23.978 LabApp] JupyterLab application directory is D:\Progra
ms\miniconda3\envs\jlab-test\share\jupyter\lab
[I 2023-10-27 11:53:23.979 LabApp] Extension Manager is 'pypi'.
[I 2023-10-27 11:53:23.982 ServerApp] jupyterlab | extension was successfully lo
aded.
[I 2023-10-27 11:53:23.983 ServerApp] Serving notebooks from local directory: E:
\tmp\mre-jupyterlab-pyright-jump-to-def
[I 2023-10-27 11:53:23.983 ServerApp] Jupyter Server 2.9.1 is running at:
[I 2023-10-27 11:53:23.983 ServerApp] http://localhost:8888/lab
[I 2023-10-27 11:53:23.984 ServerApp] http://127.0.0.1:8888/lab
[I 2023-10-27 11:53:23.984 ServerApp] Use Control-C to stop this server and shut
down all kernels (twice to skip confirmation).
[I 2023-10-27 11:53:24.135 ServerApp] Skipped non-installed server(s): bash-lang
uage-server, dockerfile-language-server-nodejs, javascript-typescript-langserver
, jedi-language-server, julia-language-server, python-language-server, python-ls
p-server, r-languageserver, sql-language-server, texlab, typescript-language-ser
ver, unified-language-server, vscode-css-languageserver-bin, vscode-html-languag
eserver-bin, vscode-json-languageserver-bin, yaml-language-server
[I 2023-10-27 11:53:27.870 LabApp] Build is up to date
[I 2023-10-27 11:53:28.548 ServerApp] Kernel started: b8f62ca6-c649-42e0-88d4-23
f0b4d34e7d
[I 2023-10-27 11:53:29.596 ServerApp] Connecting to kernel b8f62ca6-c649-42e0-88
d4-23f0b4d34e7d.
[I 2023-10-27 11:53:29.604 ServerApp] Connecting to kernel b8f62ca6-c649-42e0-88
d4-23f0b4d34e7d.
[I 2023-10-27 11:53:29.627 ServerApp] Connecting to kernel b8f62ca6-c649-42e0-88
d4-23f0b4d34e7d.
[W 2023-10-27 11:54:04.336 ServerApp] 404 GET /api/contents/e%3A/tmp/mre-jupyter
lab-pyright-jump-to-def/mymodule.py?content=0&1698378844334 (::1): e:/tmp/mre-ju
pyterlab-pyright-jump-to-def/mymodule.py is not a relative API path
[W 2023-10-27 11:54:04.336 ServerApp] wrote error: 'e:/tmp/mre-jupyterlab-pyrigh
t-jump-to-def/mymodule.py is not a relative API path'
Traceback (most recent call last):
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\tornado\web.
py", line 1786, in _execute
result = await result
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\handlers.py", line 118, in get
if not cm.allow_hidden and await ensure_async(cm.is_hidden(path)):
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_core
\utils\__init__.py", line 189, in ensure_async
result = await obj
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\filemanager.py", line 1041, in is_hidden
os_path = self._get_os_path(path=path)
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\fileio.py", line 260, in _get_os_path
raise HTTPError(404, "%s is not a relative API path" % path)
tornado.web.HTTPError: HTTP 404: Not Found (e:/tmp/mre-jupyterlab-pyright-ju
mp-to-def/mymodule.py is not a relative API path)
[W 2023-10-27 11:54:04.340 ServerApp] 404 GET /api/contents/e%3A/tmp/mre-jupyter
lab-pyright-jump-to-def/mymodule.py?content=0&1698378844334 (cb1d2ee6b579427dbd8
63f7d5b8d4bb8@::1) 3.53ms referer=http://localhost:8888/lab/tree/test.py
[W 2023-10-27 11:54:04.370 ServerApp] 404 GET /api/contents/.lsp_symlink/e%3Atmp
/mre-jupyterlab-pyright-jump-to-def/mymodule.py?type=file&content=1&format=text&
1698378844358 (::1): .lsp_symlink/e:tmp/mre-jupyterlab-pyright-jump-to-def/mymod
ule.py is outside root contents directory
[W 2023-10-27 11:54:04.371 ServerApp] wrote error: '.lsp_symlink/e:tmp/mre-jupyt
erlab-pyright-jump-to-def/mymodule.py is outside root contents directory'
Traceback (most recent call last):
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\tornado\web.
py", line 1786, in _execute
result = await result
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\handlers.py", line 118, in get
if not cm.allow_hidden and await ensure_async(cm.is_hidden(path)):
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_core
\utils\__init__.py", line 189, in ensure_async
result = await obj
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\filemanager.py", line 1041, in is_hidden
os_path = self._get_os_path(path=path)
File "D:\Programs\miniconda3\envs\jlab-test\lib\site-packages\jupyter_serv
er\services\contents\fileio.py", line 263, in _get_os_path
raise HTTPError(404, "%s is outside root contents directory" % path)
tornado.web.HTTPError: HTTP 404: Not Found (.lsp_symlink/e:tmp/mre-jupyterla
b-pyright-jump-to-def/mymodule.py is outside root contents directory)
[W 2023-10-27 11:54:04.374 ServerApp] 404 GET /api/contents/.lsp_symlink/e%3Atmp
/mre-jupyterlab-pyright-jump-to-def/mymodule.py?type=file&content=1&format=text&
1698378844358 (cb1d2ee6b579427dbd863f7d5b8d4bb8@::1) 5.00ms referer=http://local
host:8888/lab/tree/.lsp_symlink/e%3Atmp/mre-jupyterlab-pyright-jump-to-def/mymod
ule.py
Browser Output (recommended for all interface issues)
Jumping to external file: file:///e%3A/tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py
jump_to.ts:448 Jump target (source location): {line: 0, column: 4}
jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1
GET http://localhost:8888/api/contents/e%3A/tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py?content=0&1698378844334 404 (Not Found)
n @ jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1
n @ jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1
get @ jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1
get @ jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1
handleJump @ jump_to.ts:469
await in handleJump(异步)
(anonymous) @ jump_to.ts:248
Promise.then(异步)
_jumpToDefinitionOrRefernce @ jump_to.ts:247
document.body.addEventListener.once @ jump_to.ts:176
jump_to.ts:479 Error: e:/tmp/mre-jupyterlab-pyright-jump-to-def/mymodule.py is not a relative API path
at i.create (jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1:1271909)
at async m.get (jlab_core.975ecba59e6dfbddeb44.js?v=975ecba59e6dfbddeb44:1:1216878)
at async ft.handleJump (jump_to.ts:477:9)
