sourcegraph / cody

AI that knows your entire codebase
https://cody.dev
Apache License 2.0
2.21k stars 213 forks source link

"Cannot open vscode-notebook-cell" error #4466

Open ibobak opened 3 weeks ago

ibobak commented 3 weeks ago

Type: Bug

From time to time I am getthing this kind of exceptions in the output/window:

2024-06-05 16:22:42.510 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:43.030 [error] fetch failed: TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.complete (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:51718:24)
    at async generatorWithTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:177993:31)
    at async fetchAndProcessDynamicMultilineCompletions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:197289:45)
    at async Promise.all (index 0)
    at async zipGenerators (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:177959:17)
    at async generateCompletions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:197679:26)
2024-06-05 16:22:44.263 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:44.264 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:45.623 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:45.624 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:46.248 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:46.249 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:50.440 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y316sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:50.440 [error] [Extension Host] CodeExpectedError: cannot open vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D. Detail: Unable to resolve text model content for resource vscode-notebook-cell:/home/ihor/Projects2/ml_general/eda/generic/generic_etl.ipynb#Y306sZmlsZQ%3D%3D
    at n.$tryOpenDocument (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2195:62578)
2024-06-05 16:22:51.123 [error] fetch failed: TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.complete (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:51718:24)
    at async generatorWithTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:177993:31)
    at async fetchAndProcessDynamicMultilineCompletions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:197289:45)
    at async Promise.all (index 0)
    at async zipGenerators (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:177959:17)
    at async generateCompletions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:197679:26)
2024-06-05 16:23:16.205 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.2/dist/extension.node.js:169805:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}

Extension version: 1.20.2 VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:16:23.416Z) OS version: Linux x64 6.4.6-060406-generic Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz (88 x 1199)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|2, 2, 4| |Memory (System)|251.76GB (179.90GB free)| |Process Argv|--crash-reporter-id 27d42247-63fb-4d9e-9cb0-87d9974843dc| |Screen Reader|no| |VM|50%| |DESKTOP_SESSION|ubuntu-xorg| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu-xorg| |XDG_SESSION_TYPE|x11|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31061160 pythonprt:31056678 dwnewjupyter:31046869 26j00206:31048877 ```
arihant1805 commented 1 week ago

You can run the notebook on the jupyter notebook server by running the command: pip install notebook

then go to the directory where you want to open and run the command

jupyter notebook

ibobak commented 1 week ago

@arihant1805 yes, I can. And what?

I am reporting a bug related to VS Code's extension, and here is the problem (based on the stack trace): "Unable to resolve text model content for resource vscode-notebook-cell:"

What and why it cannot resolve? I don't have any problems if I am working in jupyter notebook or in jupyter lab.