Skip to content

PyPy 3.11: rich.errors.LiveError: Only one live display may be active at once #3765

Closed
@notxvilka

Description

@notxvilka

This issue was met by me while using simple progress bar from a script runnning under PyPy 3.11. It worked just fine using CPython 3.10-3.13, but somehow triggers this error from the PyPy.

Also, it happened to other projects, after quick search, but it doesn't look directly related to using PyPy:

/home/user/.local/lib/pypy3.11/site-packages/some.py:212: in init_analysis
    self.progress.start()
/home/user/.local/lib/pypy3.11/site-packages/rich/progress.py:1173: in start
    self.live.start(refresh=True)
/home/user/.local/lib/pypy3.11/site-packages/rich/live.py:113: in start
    self.console.set_live(self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <console width=80 None>
live = <rich.live.Live object at 0x000000000c71a1e0>
    def set_live(self, live: "Live") -> None:
        """Set Live instance. Used by Live context manager.
    
        Args:
            live (Live): Live instance using this Console.
    
        Raises:
            errors.LiveError: If this Console has a Live context currently active.
        """
        with self._lock:
            if self._live is not None:
>               raise errors.LiveError("Only one live display may be active at once")
E               rich.errors.LiveError: Only one live display may be active at once
/home/user/.local/lib/pypy3.11/site-packages/rich/console.py:835: LiveError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions