Created
August 14, 2024 09:14
-
-
Save patrick91/b13c84e8af2cb5ee2a4f711c8a3c99f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╭─────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────────────────────────────────────────────────────╮ | |
│ /Users/patrick/github/patrick91/textual-demo/.venv/lib/python3.12/site-packages/textual/app.py:2606 in _process_messages │ | |
│ │ | |
│ 2603 │ │ │ │ │ │ ) ╭───────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────╮ │ | |
│ 2604 │ │ │ │ │ if inline_no_clear: │ app_path = '/Users/patrick/github/patrick91/textual-demo/app.py' │ │ | |
│ 2605 │ │ │ │ │ │ console = Console() │ console = <console width=235 ColorSystem.TRUECOLOR> │ │ | |
│ ❱ 2606 │ │ │ │ │ │ console.print(self.screen._compositor) │ css = '\n App {\n background: $background;\n color: $text;\n }\n *:di'+51 │ │ | |
│ 2607 │ │ │ │ │ │ console.print() │ cursor_x = 0 │ │ | |
│ 2608 │ │ │ │ │ │ cursor_y = 0 │ │ | |
│ 2609 │ │ │ │ │ driver.stop_application_mode() │ driver = <LinuxInlineDriver PaddingAllApp(title='PaddingAllApp', classes={'-dark-mode'})> │ │ | |
│ │ error = ScreenStackError('No screens on stack') │ │ | |
│ │ headless = False │ │ | |
│ │ inline = True │ │ | |
│ │ inline_no_clear = True │ │ | |
│ │ load_event = Load() │ │ | |
│ │ message_hook = None │ │ | |
│ │ mouse = True │ │ | |
│ │ read_from = ('/Users/patrick/github/patrick91/textual-demo/app.py', 'PaddingAllApp.CSS') │ │ | |
│ │ ready_callback = None │ │ | |
│ │ run_process_messages = <function App._process_messages.<locals>.run_process_messages at 0x106674b80> │ │ | |
│ │ scope = 'App' │ │ | |
│ │ self = PaddingAllApp(title='PaddingAllApp', classes={'-dark-mode'}) │ │ | |
│ │ terminal_size = None │ │ | |
│ │ tie_breaker = -1 │ │ | |
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /Users/patrick/github/patrick91/textual-demo/.venv/lib/python3.12/site-packages/textual/app.py:1022 in screen │ | |
│ │ | |
│ 1019 │ │ except KeyError: ╭────────────────────────────── locals ───────────────────────────────╮ │ | |
│ 1020 │ │ │ raise UnknownModeError(f"No known mode {self._current_mode!r}") from None │ self = PaddingAllApp(title='PaddingAllApp', classes={'-dark-mode'}) │ │ | |
│ 1021 │ │ except IndexError: ╰─────────────────────────────────────────────────────────────────────╯ │ | |
│ ❱ 1022 │ │ │ raise ScreenStackError("No screens on stack") from None │ | |
│ 1023 │ │ | |
│ 1024 │ @property │ | |
│ 1025 │ def _background_screens(self) -> list[Screen]: │ | |
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ | |
ScreenStackError: No screens on stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from textual.app import App | |
from textual.containers import Grid | |
from textual.widgets import Placeholder | |
class PaddingAllApp(App): | |
CSS = "crash" | |
def compose(self): | |
yield Grid( | |
Placeholder("no padding", id="p1"), | |
Placeholder("padding: 1", id="p2"), | |
Placeholder("padding: 1 5", id="p3"), | |
Placeholder("padding: 1 1 2 6", id="p4"), | |
Placeholder("padding-top: 4", id="p5"), | |
Placeholder("padding-right: 3", id="p6"), | |
Placeholder("padding-bottom: 4", id="p7"), | |
Placeholder("padding-left: 3", id="p8"), | |
) | |
if __name__ == "__main__": | |
app = PaddingAllApp() | |
app.run(inline=True, inline_no_clear=True) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment