【小虫】Jupyter Nottbook内核重启失败AttributeError: module 'pdb' has no attribute 'Pdb'

Jupyter Nottbook打开失败

AttributeError: module 'pdb' has no attribute 'Pdb'
[W 09:07:16.922 NotebookApp] KernelRestarter: restart failed
[W 09:07:16.922 NotebookApp] Kernel 2cc6b140-a9a7-4ced-b8cd-3745e94b701b died, removing from map.
kernel 2cc6b140-a9a7-4ced-b8cd-3745e94b701b restarted failed!
[W 09:07:16.948 NotebookApp] 410 DELETE /api/sessions/187b2fa7-489d-41c3-86f9-f5ebea684720 (::1): Kernel deleted before session
[W 09:07:16.948 NotebookApp] Kernel deleted before session
[W 09:07:16.953 NotebookApp] 410 DELETE /api/sessions/187b2fa7-489d-41c3-86f9-f5ebea684720 (::1) 5.98ms referer=http://localhost:8888/notebooks/0CNN/Untitled2.ipynb
[W 09:07:39.107 NotebookApp] Timeout waiting for kernel_info reply from 847290c9-589b-463c-846b-095f79480c99
[E 09:07:39.108 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 847290c9-589b-463c-846b-095f79480c99)

参考了
1、Jupyter Notebook kernel 无法启动/重启等问题解决汇总
2、The kernel has died, and the automatic restart has failed

受到第二个链接中的最后一个回答的启发:D

解决:
尝试在另一个目录中打开一个新的笔记本,内核可以启动,看起来内核只是在特定的目录路径卡死
新建一个目录,把代码复制过去就可以运行了

(问题原因不清楚)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误是由于对象Pdbc没有cur属性导致的。根据提供的代码片段,我们可以看到类MysqlDb被实例化为mydb对象,而不是Pdbc对象。因此,Pdbc对象没有cur属性。要解决这个错误,你可以将代码中的Pdbc改为MysqlDb,并确保MysqlDb类中有cur属性的定义。另外,还需要检查是否正确导入了pymysql库,并确保数据库连接和查询操作的代码逻辑正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [AttributeError: ‘Connection‘ object has no attribute ‘commit‘ 表示 Connection 对象没有 commit() ...](https://blog.csdn.net/qq_51877651/article/details/129791172)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [python AttributeError: ‘MysqlDb‘ object has no attribute ‘cur](https://blog.csdn.net/qq_26086231/article/details/125268420)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [python的mysql数据查询及报错AttributeError: ‘Connection’ object has no attribute ‘curson’](https://download.csdn.net/download/weixin_38725015/14037307)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值