【问题标题】:vscode jupyter notebook: Session cannot genreate requestsvscode jupyter notebook:会话无法生成请求
【发布时间】:2022-01-11 17:06:43
【问题描述】:

两年来我一直在使用带有 Jupyter 笔记本扩展(现在由 Microsoft 维护)的 vscode,但是遇到以前从未遇到过的问题很奇怪,因为错误说:

Error: Session cannot generate requests
at S.executeCodeCell (c:\Users\alex0\.vscode\extensions\ms-toolsai.jupyter-2021.10.1101450599\out\client\extension.js:66:301742)
at S.execute (c:\Users\alex0\.vscode\extensions\ms-toolsai.jupyter-2021.10.1101450599\out\client\extension.js:66:300732)
at S.start (c:\Users\alex0\.vscode\extensions\ms-toolsai.jupyter-2021.10.1101450599\out\client\extension.js:66:296408)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at t.CellExecutionQueue.executeQueuedCells (c:\Users\alex0\.vscode\extensions\ms-toolsai.jupyter-2021.10.1101450599\out\client\extension.js:66:312326)
at t.CellExecutionQueue.start (c:\Users\alex0\.vscode\extensions\ms-toolsai.jupyter-2021.10.1101450599\out\client\extension.js:66:311862)

问题在我训练 CNN 模型时出现。我之前构建的模型遇到了这个问题,但是在准备其他深度学习模型时它工作得很好。我试过的:

  1. 安装anaconda, 使用它的内核。
  2. 重新安装 Jupyter notebook 扩展并重新打开 vscode。
  3. 以管理员身份运行 vscode。

他们都没有运气。该脚本已经过测试并在 Google Colab 上成功运行,这是我现在使用的替代方案。有什么办法可以解决吗?

其他信息:

  1. Windows 11
  2. vscode 版本:1.62.3
  3. jupyter 笔记本扩展:v2021.10.1101450599
  4. anaconda 及其 Python 3.9.6 版本包
  5. Python(自行安装):3.9.7

如有必要,我会提供额外信息。谢谢。

【问题讨论】:

    标签: python visual-studio-code jupyter-notebook


    【解决方案1】:

    您的内核可能由于某种原因崩溃了。你能在这里记录一个问题吗? https://github.com/microsoft/vscode-jupyter/issues.

    【讨论】:

    • 谢谢,我意识到我已经安装了 Nvidia cuDNN 以使用 Tensorflow 镜像策略。但是,多处理似乎存在错误。我不知道这是否相关,但以前使用我的旧笔记本电脑,运行笔记本没有问题,没有 cuDNN。
    猜你喜欢
    • 1970-01-01
    • 2020-07-13
    • 2021-07-08
    • 2021-02-08
    • 1970-01-01
    • 2022-11-02
    • 2021-10-13
    • 2020-01-25
    • 2020-12-21
    相关资源
    最近更新 更多