rich icon indicating copy to clipboard operation
rich copied to clipboard

[BUG] Progress bar/live display doesn't work anymore with ipykernel>=7

Open shuangwu5 opened this issue 2 months ago • 2 comments

  • [x] I've checked docs and closed issues for possible solutions.
  • [x] I can't find my issue in the FAQ.

Describe the bug

The refresh of progress bar/live display doesn't work properly in Jupyter notebook with the latest ipykernel 7 (released 4 days ago). Please find attached the recordings below for comparison:

Version of rich: 14.2.0

  • Correct behavior with ipykernel 6.30.1: https://github.com/user-attachments/assets/8b0af8a3-c0b9-447c-9266-c8179a351c6a

  • Buggy behavior with ipykernel 7.0.1: https://github.com/user-attachments/assets/67e36d8c-6dea-4ad1-b0ff-4d4af0f8163c

Platform

Click to expand
╭──────────────────── <class 'rich.console.Console'> ─────────────────────╮
│ A high level console interface.                                         │
│                                                                         │
│ ╭─────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=115 ColorSystem.TRUECOLOR>                           │ │
│ ╰─────────────────────────────────────────────────────────────────────╯ │
│                                                                         │
│     color_system = 'truecolor'                                          │
│         encoding = 'utf-8'                                              │
│             file = <ipykernel.iostream.OutStream object at 0x102112140> │
│           height = 100                                                  │
│    is_alt_screen = False                                                │
│ is_dumb_terminal = False                                                │
│   is_interactive = False                                                │
│       is_jupyter = True                                                 │
│      is_terminal = False                                                │
│   legacy_windows = False                                                │
│         no_color = False                                                │
│          options = ConsoleOptions(                                      │
│                        size=ConsoleDimensions(width=115, height=100),   │
│                        legacy_windows=False,                            │
│                        min_width=1,                                     │
│                        max_width=115,                                   │
│                        is_terminal=False,                               │
│                        encoding='utf-8',                                │
│                        max_height=100,                                  │
│                        justify=None,                                    │
│                        overflow=None,                                   │
│                        no_wrap=False,                                   │
│                        highlight=None,                                  │
│                        markup=None,                                     │
│                        height=None                                      │
│                    )                                                    │
│            quiet = False                                                │
│           record = False                                                │
│         safe_box = True                                                 │
│             size = ConsoleDimensions(width=115, height=100)             │
│        soft_wrap = False                                                │
│           stderr = False                                                │
│            style = None                                                 │
│         tab_size = 8                                                    │
│            width = 115                                                  │
╰─────────────────────────────────────────────────────────────────────────╯
╭─── <class 'rich._windows.WindowsConsoleFeatures'> ────╮
│ Windows features available.                           │
│                                                       │
│ ╭───────────────────────────────────────────────────╮ │
│ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │
│ ╰───────────────────────────────────────────────────╯ │
│                                                       │
│ truecolor = False                                     │
│        vt = False                                     │
╰───────────────────────────────────────────────────────╯
╭──────── Environment Variables ────────╮
│ {                                     │
│     'CLICOLOR': '1',                  │
│     'COLORTERM': None,                │
│     'COLUMNS': None,                  │
│     'JPY_PARENT_PID': '17668',        │
│     'JUPYTER_COLUMNS': None,          │
│     'JUPYTER_LINES': None,            │
│     'LINES': None,                    │
│     'NO_COLOR': None,                 │
│     'TERM_PROGRAM': 'Apple_Terminal', │
│     'TERM': 'xterm-color',            │
│     'TTY_COMPATIBLE': None,           │
│     'TTY_INTERACTIVE': None,          │
│     'VSCODE_VERBOSE_LOGGING': None    │
│ }                                     │
╰───────────────────────────────────────╯
platform="Darwin"

shuangwu5 avatar Oct 17 '25 11:10 shuangwu5

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

Rich was created by Will McGugan. Consider sponsoring Will's work on Rich.

This is an automated reply, generated by FAQtory

github-actions[bot] avatar Oct 17 '25 11:10 github-actions[bot]

I have a similar issue: the rich progress bar does not update anymore in VSCode jupyter notebook rendering. Downgrading ipykernel fixed it:

 - ipykernel==7.0.1
 + ipykernel==6.31.0

nsmith- avatar Oct 21 '25 15:10 nsmith-