@@ -336,7 +336,10 @@ def write_stderr(error_message):
336
336
337
337
# Increment the bytes and message count
338
338
self ._iopub_window_msg_count += 1
339
- byte_count = sum ([len (x ) for x in msg_list ])
339
+ if msg_type == 'stream' :
340
+ byte_count = sum ([len (x ) for x in msg_list ])
341
+ else :
342
+ byte_count = 0
340
343
self ._iopub_window_byte_count += byte_count
341
344
342
345
# Queue a removal of the byte and message count for a time in the
@@ -357,7 +360,12 @@ def write_stderr(error_message):
357
360
The notebook server will temporarily stop sending output
358
361
to the client in order to avoid crashing it.
359
362
To change this limit, set the config variable
360
- `--NotebookApp.iopub_msg_rate_limit`.""" ))
363
+ `--NotebookApp.iopub_msg_rate_limit`.
364
+
365
+ Current values:
366
+ NotebookApp.iopub_msg_rate_limit={} (msgs/sec)
367
+ NotebookApp.rate_limit_window={} (secs)
368
+ """ .format (self .iopub_msg_rate_limit , self .rate_limit_window )))
361
369
else :
362
370
# resume once we've got some headroom below the limit
363
371
if self ._iopub_msgs_exceeded and msg_rate < (0.8 * self .iopub_msg_rate_limit ):
@@ -374,7 +382,12 @@ def write_stderr(error_message):
374
382
The notebook server will temporarily stop sending output
375
383
to the client in order to avoid crashing it.
376
384
To change this limit, set the config variable
377
- `--NotebookApp.iopub_data_rate_limit`.""" ))
385
+ `--NotebookApp.iopub_data_rate_limit`.
386
+
387
+ Current values:
388
+ NotebookApp.iopub_data_rate_limit={} (bytes/sec)
389
+ NotebookApp.rate_limit_window={} (secs)
390
+ """ .format (self .iopub_data_rate_limit , self .rate_limit_window )))
378
391
else :
379
392
# resume once we've got some headroom below the limit
380
393
if self ._iopub_data_exceeded and data_rate < (0.8 * self .iopub_data_rate_limit ):
0 commit comments