Jupyter notebook count load "IOPub baud rate exceeded".

I saved a large dictionary file in numpy pickle format. I can open it in an older jupyter notebook app. But in the new version, when I run this line, I see an IOPub error.

big_dict = np.load('a_large_dictionary.npy').all()

      

Mistake:

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`.

      

There seems to be something going on in the background that I have no control over. This is weird because I am not trying to load / view the contents of this file in NotebookApp!

Any idea? How can I upload a large file without editing the Notebookapp configuration? (again, I don't want to show the content I just read from a file into a variable.)

+3


source to share


2 answers


using

jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647

      



when starting laptop fixed my problem. Source: https://github.com/JuliaLang/IJulia.jl/issues/528

+4


source


The problem is that in case of an error, it numpy.load

will print the content. First, try loading the pickle file in terminal or any other python environment other than Notebook to find the error. In this case, loading the old version of pickled numpy requires an encoding argument. This code fixed the problem:



big_dict = np.load('a_large_dictionary.npy', encoding='latin1').all()

      

+1


source







All Articles