-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working in JupyterLab or Visual Studio Code (only in hosted Jupyter Notebook) #5
Comments
@opoloko thanks for flagging this, I haven't done any extensive testing with JupyterLab or VSCode. After a bit of cursory fiddling this evening, I'm leaning towards the issue being with magic commands ( I was able to get this minimal example to work with expected behavior in Jupyterlab: ### cell 1
import ipywidgets as widgets
dropdown = widgets.Dropdown(options=['', 'foo', 'bar', 'baz'])
dropdown
### cell 2
import ipython_blocking
ctx = ipython_blocking.CaptureExecution()
with ctx:
while True:
if dropdown.value:
break
ctx.step()
### cell 3
print("just a string to demonstrate blocking until dropdown changes")
### cell 4
print(dropdown.value) After a cell -> run all, cells 3 and 4 didn't execute until after I chose an option in the dropdown widget. I haven't spent a lot of time looking at IPython magic commands outside of classic Notebook. If you have any leads on the differences between classic vs Lab/VSCode, I'd appreciate pointers. Thanks. |
Me too, FWIW... |
@bryceschober I'm afraid I'm having trouble replicating these errors. I just ran the 4-cell example code in both a VSCode (centos7 / python 3.6 / VSCode Python extension) and JupyterLab (Lab 2.2.5, using docker-stacks image, installed @jupyter-widgets from extension manager). Can you give any more details about system or versions that aren't working for you? Thanks. |
@kafonek Hey, I guess you're right. I must have been doing something else wrong, because I switched a separate notebook to |
I find this module super useful, very elegant and quick solution, but can't get it to work in Jupyter Lab (<IPython.core.display.Javascript object> error in console) or Visual Studio Code (no errors).
Do you have any clue what I could try?
The text was updated successfully, but these errors were encountered: