-
Notifications
You must be signed in to change notification settings - Fork 297
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
Notebook run action not visible on Windows but visible on Mac #6017
Comments
I believe this is caused by the jupyter extension not returning the kernels yet. They should appear if you wait. |
@misolori If you don't see the run button and kernel selections after a wait (look to see if during the wait the Python extension is trying to load that's the usual slowdown point) could you grab our logging info? In vscode settings put Jupyter->Logging->Level to 'debug' and re-run the scenario. We then have a bunch of logging info in the Jupyter output window that we can look at to help debug. |
I've left the window open for several minutes and nothing changed, don't see any progress in the status bar or anywhere else. Here are the logs when I re-run the scenario: Info 2021-05-27 09:21:58: Checking if notebook is trusted
Info 2021-05-27 09:21:58: Check if Notebook is Trusted, Class name = p, completed in 64ms, has a truthy return value, Return Value: true
Info 2021-05-27 09:21:58: notebook communications already initialized for editor file:///c%3A/Users/misolori/Documents/GitHub/notebooks/data-vizualization.ipynb
Info 2021-05-27 09:21:58: Attempting to start a server because of preload conditions ...
Info 2021-05-27 09:21:58: Find kernel spec, Class name = D, completed in 7ms, has a falsy return value, Arg 1: <Uri:c:\Users\misolori\Documents\GitHub\notebooks\data-vizualization.ipynb>, Arg 2: {"interpreter":{"hash":"0f3fc1f477b7b6e8a98505e87c3377c352684999b9cf604b9f6bec26ac37c02d"},"kernelspec":{"display_name":"Python 3.7.3 64-bit","language":"python","name":"python37364bit1b59b820878d42b59aebf362a9f522c1"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.2"},"metadata":{"interpreter":{"hash":"0f3fc1f477b7b6e8a98505e87c3377c352684999b9cf604b9f6bec26ac37c02d"}}}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: undefined
Error 2021-05-27 09:22:03: Failed to convert application/vnd.bokehjs_exec.v0+json output from a buffer object, [SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at M (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:31338)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:32418
at Array.reduceRight (<anonymous>)
at R (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:32388)
at Array.map (<anonymous>)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:27258
at Object.t.createJupyterCellFromVSCNotebookCell (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:27307)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:229702
at Array.map (<anonymous>)
at l.getCellsWithId (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:229657)
at y.getNotebookLines (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:52:461853)
at y.checkNotebook (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:52:462803)
at y.c.value (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:1:100537)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)]
Error 2021-05-27 09:22:03: Failed to convert application/vnd.bokehjs_exec.v0+json output from a buffer object, [SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at M (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:31338)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:32418
at Array.reduceRight (<anonymous>)
at R (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:32388)
at Array.map (<anonymous>)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:27258
at Object.t.createJupyterCellFromVSCNotebookCell (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:27307)
at c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:229702
at Array.map (<anonymous>)
at l.getCellsWithId (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:16:229657)
at h.checkNotebook (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:90:154393)
at h.c.value (c:\Users\misolori\code-profiles\ext\ms-toolsai.jupyter-2021.6.881596855\out\client\extension.js:1:100537)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)] |
Not sure if it was obvious by my repro steps + screenshots, but i specifically did not install the Python extension. This behavior differs from what I see on macOS. |
The error you're showing sounds like this fix here: What's your version of Jupyter Extension? Don should have fixed that with a release last night. |
Looks like Miguel is on 855 so that should be current. From the log it's "from a buffer" not "to a buffer" so it would actually be the function above the fix from Don. Miguel could you share out the file? |
Yea I'm on |
@rchiodo @IanMatthewHuff the problem is the mime type Eg if typeof data === object and object.keys(data).length > 0 or similar before we convert to bytes. And we might want to add some metadata that also take is that it's a real json so that we can deserialize it in renderer |
Ie the bug is at our end in Jupyter extension |
@DonJayamanne I agree. I'll look into it after the API renames. My only concern here is the following:
So I believe there is the mime issue that we need to resolve, but I believe that it's possibly a red herring for the run button issue. I'm on Mac so I'm not sure if I can verify myself. @misolori Apologies if we are asking too much here. But on windows with your repro steps do you also not see a run button if you open a notebook that is blank or has no output in it? Just tying to isolate if there is one issue here (mime issue) or two (mime issue + windows issue with loading controllers). Edit: Regardless, it's an issue on our end, so I'll transfer this bug to vscode-jupyter. From the discussion at the team meeting Wednesday I believe that this was ok procedure. @jrieken (since this bug was assigned to you) if me moving this messes up vscode triage procedure, just tell me and I won't move any more issues. |
I can reproduce the exact behavior that Miguel describes if I uninstall all Python interpreters, uninstall the Python extension, and delete all kernels from my jupyter/kernels directory. @misolori You mentioned you have the default system Python 2.7, I assume that is on Mac? Do you have Python installed on your Windows machine at all? If you don't have Python installed on your Windows machine (and no kernels), I think what might be happening here is that if you have no Python interpreters or kernels, the Jupyter extension does not register any notebook controller, and under the kernel push UX, the run button only appears when a kernel becomes available. If the Jupyter extension can't create and return any controllers, the run button stays hidden. On macOS Python 2.7 is available by default so perhaps we are able to setup a controller for that. We have plans to work around this by returning a dummy Python 3 kernel which would address this bug: #5861 |
I misspoke, I had previously installed Python 2.7 so I did have that installed. I also tried the repro steps on a Windows Sandbox environment and still saw the same issue. However, in today's insiders I am no longer seeing this issue so not sure if the Jupyter extension pushed an update that fixed this. Here are my current versions: Jupyter: v2021.6.885080120 |
Closing as I can no longer repro and it appears to be fixed. Appreciate everyone's help here! |
Trying to figure if this is native notebook bug or a jupyter extension bug. I'm currently trying capture the end to end experience for opening a notebook file in VS Code.
However on macOS, the run actions DOES show up, so there is some weird behavior here:
Python 2.7.15
Edition Windows 10 Pro
Version 20H2
Installed on 3/24/2021
OS build 19042.928
Experience Windows Feature Experience Pack 120.2212.551.0
Version: 1.57.0-insider (user setup)
Commit: 1082913dd012e21cc5f35a06f15c480ca447f67f
Date: 2021-05-27T06:55:24.593Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19042
cc @claudiaregio
The text was updated successfully, but these errors were encountered: