Cursor no longer able to execute jupyter cells

Yesterday I was able to execute jupyter notebook cells in cursor, today this stopped working. When I execute a jupyter cell I just get a small red X in the corner but no python stack trace or anything else. Interestingly all of my cells now have grey shadows around them that they did not have yesterday either. This shadow disappears when I mouse over the cell. This seems like more than coincidence. I have not changed or updated anything manually. Just to emphasize cursor was able to execute cells in jupyter notebooks yesterday, and I have not update cursor or any plugins since then. I have also tried restarting cursor, and restarting my mac but the issue still persists.

Version: 0.44.11
VSCode Version: 1.93.1
Commit: fe574d0820377383143b2ea26aa6ae28b3425220
Date: 2025-01-03T07:59:06.361Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.2.0

I am seeing these errors in the console, so perhaps this is related?

[Extension Host] error 16:30:37.049: Jupyter Extension: Failed to download widget script source from http://localhost:8888/nbextensions [Error: Error downloading from http://localhost:8888/nbextensions using custom fetch: Not Found at mT.getWidgetScriptSourceUsingFetch (/Users/michael.barton/.cursor/extensions/ms-toolsai.jupyter-2024.8.1-darwin-arm64/dist/extension.node.js:304:111359) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]
workbench.desktop.main.js:530 [Extension Host] warn 16:30:37.049: Jupyter Extension: Failed to fetch script sources [Error: Error downloading from http://localhost:8888/nbextensions using custom fetch: Not Found
	at mT.getWidgetScriptSourceUsingFetch (/Users/michael.barton/.cursor/extensions/ms-toolsai.jupyter-2024.8.1-darwin-arm64/dist/extension.node.js:304:111359)
	at process.processTicksAndRejections

Potentially related to this issue? I don’t know enough

FWIW I think I found the solution:

jupyter nbconvert --clear-output --inplace $NOTEBOOK

I assume something in the output was causing an issue with loading the extension? Perhaps a memory issue? Removing the output seemed to fix the issue. Hope this helps anyone else encountering a similar issue.

Glad to hear you found a fix here!

1 Like