Closed lesteve closed 6 months ago
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
Fyi this is where the path is being set for starting a connection with the jupyter server. https://github.com/executablebooks/thebe/blob/main/packages/core/src/server.ts#L123
The latest version of thebe (0.9.x) supports this. I'm going to close this issue for now, though I can imagine we'd want to re-open it if other clients of thebe are unable to upgrade for some reason.
Describe the bug
context In the JupyterBook thebe integration, the kernel is not started from the same folder as the notebook, as was reported in https://github.com/executablebooks/jupyter-book/issues/1304. I think I have managed to confirm this is an issue in thebe. JupyterBook does set the
kernelOptions
path
as mentioned in https://github.com/executablebooks/jupyter-book/issues/107#issuecomment-520007658 and I have double-checked this.expectation
kernelOptions
path
should be taken into account as mentioned in https://thebe.readthedocs.io/en/latest/configure.html#configure-the-working-directory-of-the-launched-kernelbug
kernelOptions
path
is not taken into accountproblem This is an issue since the current folder will not be the same whether in Binder or in thebe, which causes issues when loading local files with relative paths https://github.com/INRIA/scikit-learn-mooc/issues/669 or importing local modules https://github.com/executablebooks/jupyter-book/issues/1304
Reproduce the bug
you also need to start a local notebook server
and open a browser at http://127.0.0.1:8080/development/local.html
I modified
options['kernelOptions']['path']
to bedevelopment
:but running the code in thebe shows that the current working directory is still the root of the repo:
With the browser debugger I can confirm that
path
gets passed to theKernelManager.startNew
call:but I have no idea to debug further ...
List your environment
Python 3.11 OS: Ubuntu 22.04