Jupyter笔记本中超出IOPub数据速率(查看图像时) [英] IOPub data rate exceeded in Jupyter notebook (when viewing image)
问题描述
我想在Jupyter笔记本中查看图像。这是一个9.9MB的.png文件。
I want to view an image in Jupyter notebook. It's a 9.9MB .png file.
from IPython.display import Image
Image(filename='path_to_image/image.png')
我收到以下错误:
IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
A bit surprising and reported elsewhere.
这是预期的,是否有一个简单的解决方案?
Is this expected and is there a simple solution?
(错误消息建议在中更改限制 - NotebookApp.iopub_data_rate_limit
。)
推荐答案
我使用 networkx
和 bokeh
这适用于Windows 7(取自此处):
This works for me in Windows 7 (taken from here):
-
创建一个jupyter_notebook_config.py文件,包含所有默认值已注释掉,您可以使用以下命令行:
To create a jupyter_notebook_config.py file, with all the defaults commented out, you can use the following command line:
$ jupyter notebook --generate-config
打开文件并搜索 c.NotebookApp.iopub_data_rate_limit
注释掉 c.NotebookApp.iopub_data_rate_limit = 1000000
这一行并将其更改为更高的默认费率。 l使用 c.NotebookApp.iopub_data_rate_limit = 10000000
Comment out the line c.NotebookApp.iopub_data_rate_limit = 1000000
and change it to a higher default rate. l used c.NotebookApp.iopub_data_rate_limit = 10000000
这个无法容忍的默认配置在很多地方出现。请参阅git问题:
This unforgiving default config is popping up in a lot of places. See git issues:
看起来可能会解决 5.1发布
Jupyter笔记本是现在在发布 5.2.2
。这个问题应该是已解决。使用conda或pip升级。
Jupyter notebook is now on release 5.2.2
. This problem should have been resolved. Upgrade using conda or pip.
这篇关于Jupyter笔记本中超出IOPub数据速率(查看图像时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!