Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions packages/voila/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,23 @@ export class WidgetManager extends JupyterLabManager {
await Promise.all(
widgets_info.map(async widget_info => {
const state = (widget_info as any).msg.content.data.state;
const modelPromise = this.new_model(
{
model_name: state._model_name,
model_module: state._model_module,
model_module_version: state._model_module_version,
comm: (widget_info as any).comm
},
state
);
const model = await modelPromise;
models[model.model_id] = model;
return modelPromise;
try {
const modelPromise = this.new_model(
{
model_name: state._model_name,
model_module: state._model_module,
model_module_version: state._model_module_version,
comm: (widget_info as any).comm
},
state
);
const model = await modelPromise;
models[model.model_id] = model;
} catch (error) {
// Failed to create a widget model, we continue creating other models so that
// other widgets can render
console.error(error);
}
})
);
return models;
Expand Down