-
Notifications
You must be signed in to change notification settings - Fork 5k
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
javascript-python communication not working when "Run All" cells #1622
Comments
It probably is, but only after the cell printing it has run. Depending on what you need it for, you may be able to define a function in Python that receives the value, and then call that function from the Javascript. |
No, actually is not modified, because in that case, after every cell is executed, the modification should be available let's say on a new cell, or if I re-execute the last cell, but it isn't. And calling a defined python function from javascript, in my case, does not work either, because the data I need comes only from javascript (is a json object), and I'll have to pass it as a parameter to the function, which is the same thing that storing it into a python var. *Update: * |
Hello!, When I try to apply a "Run All" ... it interrupts the script when it reads the magic line %%javascript. Tks! |
Bump, I have the same issue. I get the Notebook name in a Javacript function for archiving of the notebook as html. But for me also only the cell by cell execution works. It is the same behaviour for code like this:
|
I'm having the exact same issue! Any idea how this can be fixed? |
Is there a way to solve this issue now? |
Having the same issue as well. Tried adding this in the cell after my %%javascript
Unfortunately, this didn't work, the code was just in an indefinite await period. Definitely looking for a solution to this. |
I believe this issue is more about |
Hi everyone, I have a notebook with this:
It turns out that it works well (the last print for num shows 43) but only when I execute this cell by cell. But if I execute it by clicking the "Run All" menu, or by calling in a js file the "notebook.execute_all_cells()" function, the num variable is never modified from the js code.
The idea is that I have some special notebooks where I need to execute every cell when it loads, but some cells depend on a python variable filled from javascript. I've tried to delay the last cell execution time enough so the previous cell is finished, but since the cells execution is linear, I don't think this could solve my problem.
Can someone point me a way on how to do this?
The text was updated successfully, but these errors were encountered: