-
Notifications
You must be signed in to change notification settings - Fork 295
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
IPyWidgets do not renderer due to a 401 error in webview #12843
Comments
Thanks for filing this issue and testing the latest changes, and sorry you are running into this issue.
Please could you confirm the fact that this works when you are NOT using a multi-root workspace folder (i.e. that it works when opening a single folder in vscode). thanks |
No. This issue has only occurred for me when working with a single folder workspace at |
Sorry, but I still don’t understand that |
Please could you enable logging as follows:
|
Sure. Here's the log for both workspaces. Workspace 1 (
|
Workspace 2 (includes Workspace 1) (
|
Thanks
|
Console log from Workspace 1 (
|
Console log from Workspace 2 (
|
Please could you check whether this file exists in your file system? |
Yes. It does. /*! For license information please see index.js.LICENSE.txt */
define(["@jupyter-widgets/base"],(t=>(()=>{var e={153:(t,e,n)=>{(e=n(352)(!1)).push([t.id,".jupyter-matplotlib {\n width: auto;\n height: auto;\n flex: 1 1 auto;\n>
//# sourceMappingURL=index.js.map |
@christasich Thanks for the confirmation, will rope in one of my colleagues who might be able to help here.
|
@DonJayamanne I confirmed that the Update: The KeyError Traceback (most recent call last)
File c:\Users\chris\projects\dissertation\.venv\lib\site-packages\ipympl\backend_nbagg.py:279, in Canvas._handle_message(self, object, content, buffers)
276 self.manager.handle_json(content)
278 else:
--> 279 self.manager.handle_json(content)
File c:\Users\chris\projects\dissertation\.venv\lib\site-packages\matplotlib\backends\backend_webagg_core.py:462, in FigureManagerWebAgg.handle_json(self, content)
461 def handle_json(self, content):
--> 462 self.canvas.handle_event(content)
File c:\Users\chris\projects\dissertation\.venv\lib\site-packages\matplotlib\backends\backend_webagg_core.py:266, in FigureCanvasWebAggCore.handle_event(self, event)
263 e_type = event['type']
264 handler = getattr(self, 'handle_{0}'.format(e_type),
265 self.handle_unknown_event)
--> 266 return handler(event)
File c:\Users\chris\projects\dissertation\.venv\lib\site-packages\matplotlib\backends\backend_webagg_core.py:293, in FigureCanvasWebAggCore._handle_mouse(self, event)
290 button = event['button'] + 1
292 e_type = event['type']
--> 293 modifiers = event['modifiers']
294 guiEvent = event.get('guiEvent')
295 if e_type in ['button_press', 'button_release']:
KeyError: 'modifiers' |
@matthai An easy workaround until there is a fix is to add the "files.exclude": {
"**/.vscode-server-insiders": true
} |
@christasich You can verify the fix by installing the above VSIX
|
This solves it for me. Thank you! |
Applies To
What happened?
Recently, support for ipywidgets 8 was added with #8552. After updating to the latest vscode-insiders and the pre-release versions of the Jupyter extension and notebook renderers, all my widgets load properly except for the matplotlib widget. This happens on two different remote machines running Ubuntu Server 22.04.1 LTS. When attempting to plot with
%matplotlib widget
enabled, I get a window that says, "Click to show javascript error." Clicking this shows the following:Typically, I work within single folder workspaces for my projects. For this project, it's located under
~/projects/{my-project}
. Interestingly, if I add my home directory (~/) to the project making it a multi-root workspace, the error goes away. I'm guessing this means there is an issue with getting the proper path for the widget when it's not part of the workspace.VS Code Version
1.76.0-insider
Jupyter Extension Version
v2023.2.1000451018
Jupyter logs
Coding Language and Runtime Version
Python 3.10.9
Language Extension Version (if applicable)
v2023.3.10411009
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Remote
The text was updated successfully, but these errors were encountered: