Commit f0a4271
committed
SyncLanguageServer.create - small documentation note
To clarify that relative paths for repositories are not supported.
Currently if it's using relative path, `create_server` fails with traceback similar to the one below:
```python
Traceback (most recent call last):
File "third_test.py", line 11, in <module>
with lsp.start_server():
File "\Python311\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "\Python311\Lib\site-packages\multilspy\language_server.py", line 744, in start_server
asyncio.run_coroutine_threadsafe(ctx.__aenter__(), loop=self.loop).result()
File "\Python311\Lib\concurrent\futures\_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result
raise self._exception
File "\Python311\Lib\contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "\Python311\Lib\site-packages\multilspy\language_servers\jedi_language_server\jedi_server.py", line 101, in start_server
initialize_params = self._get_initialize_params(self.repository_root_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Python311\Lib\site-packages\multilspy\language_servers\jedi_language_server\jedi_server.py", line 50, in _get_initialize_params
d["rootUri"] = pathlib.Path(repository_absolute_path).as_uri()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\Python311\Lib\pathlib.py", line 566, in as_uri
raise ValueError("relative path can't be expressed as a file URI")
ValueError: relative path can't be expressed as a file URI
```1 parent fdbc454 commit f0a4271
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
| 682 | + | |
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| |||
0 commit comments