我用numpy泡菜格式存储了一个大字典文件。我可以在旧的jupyter笔记本应用程序中打开它。但是,在新版本中,当我运行这一行时,我会看到IOPub错误。
big_dict = np.load('a_large_dictionary.npy').all()
错误:
IOPub data 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_data_rate_limit`.
在我无法控制的背景下,似乎发生了什么事情。这很奇怪,因为我没有试图在NotebookApp中加载/查看这个文件的内容!
有什么想法吗?如何在不编辑Notebookapp配置的情况下加载一个大文件?(同样,我不想将刚从文件中读取的内容显示到变量中。)
发布于 2017-05-22 10:51:49
问题是,如果出现错误,numpy.load
将打印内容。首先,尝试在终端或除Notebook之外的任何其他python环境中加载泡菜文件以查找错误。在这种情况下,加载较早版本的腌制numpy需要编码参数。此代码修复了问题:
big_dict = np.load('a_large_dictionary.npy', encoding='latin1').all()
发布于 2017-07-15 10:12:08
使用
jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647
当启动笔记本时,我的问题就解决了。来源:https://github.com/JuliaLang/IJulia.jl/issues/528
https://stackoverflow.com/questions/44110174
复制相似问题