diff --git a/src/inspectorscripts.ts b/src/inspectorscripts.ts index e186380..eb60247 100644 --- a/src/inspectorscripts.ts +++ b/src/inspectorscripts.ts @@ -27,7 +27,11 @@ from IPython.core.magics.namespace import NamespaceMagics _jupyterlab_variableinspector_nms = NamespaceMagics() _jupyterlab_variableinspector_Jupyter = get_ipython() -_jupyterlab_variableinspector_nms.shell = _jupyterlab_variableinspector_Jupyter.kernel.shell +# Check kernel implementation +if hasattr(_jupyterlab_variableinspector_Jupyter.kernel, 'shell'): + _jupyterlab_variableinspector_nms.shell = _jupyterlab_variableinspector_Jupyter.kernel.shell +else: + _jupyterlab_variableinspector_nms.shell = _jupyterlab_variableinspector_Jupyter _jupyterlab_variableinspector_maxitems = 10 diff --git a/src/variableinspector.ts b/src/variableinspector.ts index ecd4403..3926c65 100644 --- a/src/variableinspector.ts +++ b/src/variableinspector.ts @@ -386,6 +386,9 @@ export class VariableInspectorPanel row.appendChild(cell); cell = document.createElement('jp-data-grid-cell') as DataGridCell; + cell.gridColumn = '7'; + row.appendChild(cell); + this._table.appendChild(row); const rendermime = this._source?.rendermime; if (item.isWidget && rendermime) { const model = new OutputAreaModel({ trusted: true }); @@ -398,9 +401,6 @@ export class VariableInspectorPanel '
' ); } - cell.gridColumn = '7'; - row.appendChild(cell); - this._table.appendChild(row); } }