我编写了一个小型代码以打开,读,关闭和打印一个TXT文件。我使用Jupyter
笔记本电脑运行它,但是该文件未打印,我收到一条消息,说IOPUB数据速率超过了。
我已经生成了一个默认的配置文件,并将值从1000000
提高到10000000
,但执行打印输出没有变化。在代码和消息下方,您知道我的原因以及我该怎么做才能克服这个问题?
IOPUB数据速率超过了。笔记本服务器将暂时停止 向客户发送输出以避免崩溃。改变 此限制,设置配置变量 -notebookapp.iopub_data_rate_limit。
电流值:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)
我已经生成了默认配置文件,并将其值从1000000
增加到10000000
,但执行打印输出没有变化。
import os
# open Output_log.txt for reading text
myfile = open("E:\science\Projet situation\Output_log.txt", "rt")
# read the entire file into a string
contents = myfile.read()
# close the file
myfile.close()
# print contents
print(contents)
我尝试过此jupyter笔记本 - notebookapp.iopub_data_rate_late_limit = 1.0e10在anaconda中启动笔记本,现在正常工作,现在可以读取文件。但是似乎每次我需要打开笔记本时,我都需要执行此comand,这是否正常?