Skip to content

Commit 3819e7d

Browse files
author
Alan Fleming
committed
Avoid generating a warning "Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel ..." when loading a kernel where ipywidgets hasn't been imported yet.
1 parent fc3967c commit 3819e7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/base-manager/src/manager-base.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,11 @@ export abstract class ManagerBase implements IWidgetManager {
384384
let data: any;
385385
let buffers: any;
386386
let timeoutID: number | undefined;
387+
const comm_ids = await this._get_comm_info();
388+
if (Object.keys(comm_ids).length === 0) {
389+
// There is nothing to load, either a new kernel or no widgets in the kernel.
390+
return Promise.resolve();
391+
}
387392
try {
388393
const initComm = await this._create_comm(
389394
CONTROL_COMM_TARGET,

0 commit comments

Comments
 (0)