一、問題
運行jupyter notebook,然后運行python代碼,讀取文件處理時,會報錯。發現時IO讀取時錯誤。應該是IO速率問題。
下面是問題報錯:
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`. Current values: NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec) NotebookApp.rate_limit_window=3.0 (secs)
二、解決辦法
2.1、生產配置文件
運行命令:
jupyter notebook --generate-config
說明:
- 如果之前運行過這個命令,則不用再次運行。
- 這個命令的目的時生產運行需要的配置文件。
2.2、修改配置文件
修改生產的配置文件:jupyter_notebook_config.py
把默認的配置項:#c.NotebookApp.iopub_data_rate_limit = 1000000
修改成:c.NotebookApp.iopub_data_rate_limit = 1000000000
2.3、重啟jupter notebook
- 注意前面修改的配置文件需要保存。
- 報錯中有兩個配置項,另一個配置項不需要修改。
三、參考
參考: