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

If XDG_DATA_HOME is configured without JUPYTER_DATA_DIR, the app doesn't appear to find kernels #15735

Open
1 of 2 tasks
randallb opened this issue May 31, 2024 · 0 comments
Open
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@randallb
Copy link

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

When XDG_DATA_HOME is configured (seemingly without JUPYTER_DATA_DIR) on unix, the plugin fails to properly detect kernels.

const linuxJupyterPath = path.join('.local', 'share', 'jupyter', 'kernels');

https://github.com/bolt-foundry/vscode-jupyter/blob/main/build/installDenoKernel.ts#L10

test('Get datadir for non-python kernel on Unix with JUPYTER_DATA_DIR & XDG_DATA_HOME', async () => {
when(platformService.homeDir).thenReturn(unixHomeDir);
when(platformService.osType).thenReturn(OSType.Linux);
const xdgDataHome = (process.env['XDG_DATA_HOME'] = '/usr/xdgDataHome');
const dataDirs = await jupyterPaths.getDataDirs({ resource: undefined });
assert.strictEqual(dataDirs.length, 1);
assert.strictEqual(dataDirs[0].toString(), Uri.joinPath(Uri.file(xdgDataHome), 'jupyter').toString());
});

I think those are the related callsites / tests. I didn't feel familiar enough to try a PR, but am happy to do so.

VS Code Version

1.89

Jupyter Extension Version

v2024.4.0

Jupyter logs

No response

Coding Language and Runtime Version

deno

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@randallb randallb added the bug Issue identified by VS Code Team member as probable bug label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants