Reputation: 11
I'm trying devleop a jupyter notebook extension for vscode that works specifically with dataframes (in pandas). As part of this project, I need to access data stored in dataframes within the notebook environment. To achieve this, I attempted to connect to the notebook's currently running kernel, following the approach:
const jupyterExt = vscode.extensions.getExtension('ms-toolsai.jupyter');
if (!jupyterExt) { return; }
await jupyterExt.activate();
const kernelService = await jupyterExt.exports.getKernelService();
if (!kernelService) {
console.log("Kernel service is not available.");
return;
}
However, my attempts were all unsuccessful, resulting in the error message: "Please contact the Jupyter Extension to get access to the Kernel API. Publisher undefined_publisher." Any insights on how to correctly establish a connection to the kernel service or alternative methods to access the kernel's capabilities?
Also, I've tried to implement a "Controller" myself, which is a notebook kernel in vscode, and it still doesn't work. Correct me if I'm wrong, I believe I should try to communicate with the existing kernel instead of defining a new one myself.
Any help would be really appreciated!!
vscodeextensionjavascripttypescript
Upvotes: 1
Views: 47