-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Static resources fail to load in Notebook renderer with 401 error #175033
Static resources fail to load in Notebook renderer with 401 error #175033
Comments
@mjbvz I have a work around in the Jupyter extension right now, i've added a dummy placeholder script that does nothing, |
@DonJayamanne Can you share steps to reproduce this with the fix in place? Also, does this happen on normal desktop too, or only sshe Unclear why this is not working as we should add preloads to the local resource roots: vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts Line 1009 in e9229a1
|
@mjbvz
"jupyter.widgetScriptSources": [
],
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
X = np.linspace(0, 2*np.pi)
Y = np.sin(X)
fig, ax = plt.subplots()
ax.plot(X, Y)
Note: This is now working in the latest pre-release version of Jupyter extension |
I believe the broken version is be v2023.2.1000451018 but I'm having trouble reproducing this @DonJayamanne The output either never renders anything (but there is no network error) or renders as an image: Any other steps? |
Not sure which pre-release to use anymore, as the pre-release has changed since
"jupyter.widgetScriptSources": [
],
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
X = np.linspace(0, 2*np.pi)
Y = np.sin(X)
fig, ax = plt.subplots()
ax.plot(X, Y)
|
I'm still unable to reproduce this issue @DonJayamanne Are you running the jupyter out of sources by chance or have you patched VS Code/jupyter in some other way? The path to the resource we a trying to load looks weird: In normal installs, we should load resources from a path that looks more like:
If you are able, you can also try setting a breakpoint in |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
information was provided |
@DonJayamanne #182664 lets you specific an additional set of localResourceRoots that should be allowed when loading the preload. Can you please try adding these for the python static preload contribution? Let me know if fixes the problem! |
Thanks @mjbvz , seems to work, microsoft/vscode-jupyter#13531 |
Changes were made upstream in VS Code, marking as verified. |
Originally filed here microsoft/vscode-jupyter#12843
Problem:
notebookPreload
If however we have a dummy script file (in the Jupyter extension directory) that is defined as a
rendererScripts
in thecreateNotebookController
VS Code API , then all resources from Jupyter extension directory are loadedI.e. using the above API in some way registers the Juptyer extension directory as a supported
root
for scripts, and using the static contributionntoebookPreload
does not.The text was updated successfully, but these errors were encountered: