Linked Questions

Popular Questions

I am trying to run a notebook from another notebook using the as follows:

import ipywidgets as widgets
from ipywidgets import interact
from ipywidgets import Box

button = widgets.Button(description='Run model')
out = widgets.Output()
def on_button_clicked(b):
    button.description = 'Run model'
    with out:"/mynotebookpath",60)

widgets.VBox([button, out])

However, I am getting the following error:

IllegalArgumentException: Context not valid. If you are calling this outside the main thread, you must set the Notebook context via dbutils.notebook.setContext(ctx), where ctx is a value retrieved from the main thread (and the same cell)

I can run the notebook just fine when I do %run on a single cell and even"/mynotebook", 60) on a single cell. However I cannot get it to run within the ipywidget context

Related Questions