-
Notifications
You must be signed in to change notification settings - Fork 47
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
push_notebook doesn't update in VSCode .ipynb #199
Comments
@amarcuvitz please state all relevant package versions |
jupyter 1.0.0 Does this cover it? |
I can confirm that comms don't work at all in VSCode with bokeh 3.4.0rc1 and jupyter_bokeh 4.0. |
Much thanks ... particularly from my head which I can stop banging against a wall. I am trying to be able to update a Jupyter cell dynamically (animation and such) while keeping the development of the notebook/code in a VSCode normal workflow (i.e. without launching browsers or restarting servers). This must be a common desire so I have to conclude I am not approaching it in the right way. Can you give me a hint as to the best way to go about this? |
Just to be completely up front, yours is the first VSCode related question I can recall in the last... two? years. Many Bokeh users use Bokeh in Jupyter notebooks. IMO very few of them are using "VSCode notebooks", specifically.
In the short term? Use actual, authentic Jupyter-published software (i.e. Jupyter Notebook or JupyterLab) is all i can suggest.
@mattpap Are there any errors reported? Is cc @philippjfr @jbednar for visibility |
The best you'll be able to do in VSCode is using the |
There is simply no way to access the regular Jupyter comms from inside a VSCode notebook so piggybacking on the ipywidgets comm layer is the only thing that can be supported. |
Right, and now IIRC even that is only possible at all because Microsoft has decided to make an exception specifically for |
No errors reported when example code is run as .ipynb from VSCode. Thanks everyone for your suggestions. I can see I'm trying to do something that others are not. |
For what it's worth, lots of people are trying to use HoloViz tools (which build on Bokeh) in VSCode notebooks. That's why we pushed for |
@philippjfr Can we just take a hard dependency on |
A hard dependency in Bokeh itself? I would be okay with saying that we deprecate |
@philippjfr no, I meant of
Separately, tangentially, I do also think it is a good time to start having this discussion, even if it is only for "4.0" and even if that is some time away. Edit: Alternatively, we could migrate |
Good question, and I don't think there is a good reason apart from the fact that it was a little unclear how robust this approach was. In Panel we have long been dropping all VSCode and Google Colab users into this mode since it's really the only thing that will work in those environments and apart from the usual issues with
|
OK if "ipywidgets comms mode" seems like it's working reasonably well at this point, I guess I'd gently encourage looking into whether the UX can become more transparent by using it all the time automatically. (Of course I'm not someone who will be working on anything notebook-related, so take that for what it's worth)
👍 That's fine too, like I said my only real ultimate goal here is to be able to rip all the comms code out of core Bokeh. |
While it'd be nice for it to work by default. It is possible to work around it using jupyter_bokeh as described by @bryevcv . Please check this stack overflow questions if you stumble upon the issue and need a solution right now: |
This works! Thanks, I had given up. 😊 |
I tried the stackoverflow solution and hit this issue: #209 |
I am not able to get the various push_notebook examples to update when run as .ipynb files from VSCode. They work fine when run from a Jupyter notebook. Below is a simple standard example that runs in a Jupyter notebook but not in VSCode. I need to do Bokeh animation from within a VSCode development environment.
Isn’t this supposed to work as a cell in an .ipynb file executed in VSCode?
The text was updated successfully, but these errors were encountered: