Home > Software engineering >  VS Code Interactive is not rendering tqdm.notebook properly
VS Code Interactive is not rendering tqdm.notebook properly

Time:08-19

I used to use from tqdm.auto import tqdm and when I was in VS Code Interactive, I would get nice outputs of tqdm like so:

tqdm.notebook image

I setup a new environment with venv, and now I've lost that - only the text version works:

tqdm.auto import tqdm only works with text

When I run this sample cell:

from tqdm.auto import tqdm
import time
for i in tqdm(range(10)):
    time.sleep(.1)

I get nothing outputted:

no outputs :(

I noticed some errors in the jupyter logs:

info 13:23:28.399: Execute Cell 2 Interactive-1.interactive
info 13:23:28.476: Widget Message: WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:2.0.0
info 13:23:28.525: Widget Message: WidgetManager: Loading class ProgressStyleModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.526: Widget Message: WidgetManager: Loading class FloatProgressModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.527: Widget Message: WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:2.0.0
info 13:23:28.527: Widget Message: WidgetManager: Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.527: Widget Message: WidgetManager: failed, Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.527: Widget Message: WidgetManager: failed, Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
error 13:23:28.532: Widget load failure {} {
  className: 'HTMLStyleModel',
  moduleName: '@jupyter-widgets/controls',
  moduleVersion: '2.0.0',
  cdnsUsed: false,
  isOnline: true,
  timedout: false,
  error: '{}'
}
info 13:23:28.534: Widget Message: WidgetManager: Loading class HTMLModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.534: Widget Message: WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:2.0.0
info 13:23:28.534: Widget Message: WidgetManager: Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.534: Widget Message: WidgetManager: failed, Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.534: Widget Message: WidgetManager: failed, Loading class HTMLStyleModel:@jupyter-widgets/controls:2.0.0
error 13:23:28.534: Widget load failure {} {
  className: 'HTMLStyleModel',
  moduleName: '@jupyter-widgets/controls',
  moduleVersion: '2.0.0',
  cdnsUsed: false,
  isOnline: true,
  timedout: false,
  error: '{}'
}
info 13:23:28.535: Widget Message: WidgetManager: Loading class HTMLModel:@jupyter-widgets/controls:2.0.0
info 13:23:28.536: Widget Message: WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:2.0.0
info 13:23:28.542: Widget Message: WidgetManager: Loading class HBoxModel:@jupyter-widgets/controls:2.0.0
info 13:23:29.464: Cell 2 executed with state Success

CodePudding user response:

Looks like this is an issue with the newest release - 8.0.0

CodePudding user response:

I think your assumption is correct. After I downgraded ipywidgets to 7.7.1, tqdm.notebook works fine.

  • Related