diff --git a/custom_components/pyscript/__init__.py b/custom_components/pyscript/__init__.py index 8474e73..45b0fe4 100644 --- a/custom_components/pyscript/__init__.py +++ b/custom_components/pyscript/__init__.py @@ -121,7 +121,9 @@ async def jupyter_kernel_start(call): _LOGGER.debug("service call to jupyter_kernel_start: %s", call.data) global_ctx_name = GlobalContextMgr.new_name("jupyter_") - global_ctx = GlobalContext(global_ctx_name, global_sym_table={}, manager=GlobalContextMgr) + global_ctx = GlobalContext( + global_ctx_name, global_sym_table={"__name__": global_ctx_name}, manager=GlobalContextMgr + ) global_ctx.set_auto_start(True) GlobalContextMgr.set(global_ctx_name, global_ctx)