【Python】Jupyter Notebook:IOPub message rate exceeded. The notebook server will temporarily stop sending output to the client in order to avoid crashing it..解决方案

发布时间 2023-03-22 21:10:44作者: 双份浓缩馥芮白

✨报错提示

IOPub message rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_msg_rate_limit`.

Current values:
NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)
NotebookApp.rate_limit_window=3.0 (secs)

超出 IOPub 消息速率,笔记本服务器将暂时停止发送输出给客户端,以避免崩溃。要更改此限制,请设置配置变量--NotebookApp.iopub_msg_rate_limit

报错信息很完整并且实际上已经给出了解决方案


✨解决方案

在Jupyter新建单元格运行如下命令

在弹出Browser窗口中继续运行该Notebook

!jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

如果需要了解有关于Jupyter配置文件信息

请继续阅读下文


使用如下命令行查看重置默认Jupyter配置

jupyter notebook --generate-config

根据命令回显可知Jupyter配置文件位于如下路径

# Unix
~/.jupyter/jupyter_notebook_config.py
# Windows
C:\Users\${username}\.jupyter\jupyter_notebook_config.py

Windows中~即当前用户目录

一般情况下等价于C:\Users\${username}\


进入该目录

使用文本编辑器打开jupyter_notebook_config.py

搜索NotebookApp.iopub_data_rate_limit

## (bytes/sec)
#          Maximum rate at which stream output can be sent on iopub before they are
#          limited.
#  Default: 1000000
# c.NotebookApp.iopub_data_rate_limit = 1000000

取消# c.NotebookApp.iopub_data_rate_limit = 1000000注释

修改为

NotebookApp.iopub_data_rate_limit=1.0e10

✨参考及引用

https://stackoverflow.com/questions/43288550/iopub-data-rate-exceeded-in-jupyter-notebook-when-viewing-image


⭐转载请注明出处

本文作者:双份浓缩馥芮白

原文链接:https://www.cnblogs.com/Flat-White/p/17240410.html

版权所有,如需转载请注明出处。