toot
toot copied to clipboard
Crash when viewing a particular toot from TUI
❯ toot env
toot 0.43.0
Python 3.12.3 (main, Apr 9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)]
macOS-14.4.1-arm64-arm-64bit
When using toot TUI to view: https://mastodon.cloud/@slashdot/112287426200500203
toot TUI crashes with the output below.
Traceback (most recent call last):
File "/opt/homebrew/bin/toot", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/toot/cli/__init__.py", line 124, in wrapped
return f(get_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/toot/cli/tui.py", line 73, in tui
tui.run()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/toot/tui/app.py", line 164, in run
self.loop.run()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 337, in run
self._run()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 439, in _run
self.event_loop.run()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/asyncio_loop.py", line 235, in run
raise exc.with_traceback(exc.__traceback__)
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/asyncio_loop.py", line 114, in _entering_idle
callback()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 650, in entering_idle
self.draw_screen()
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 667, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/frame.py", line 481, in render
body = self.body.render((maxcol, maxrow - ftrim - htrim), focus and self.focus_part == "body")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/columns.py", line 1026, in render
w.render(w_size, focus=focus and self.focus_position == i),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/padding.py", line 340, in render
canv = self._original_widget.render((maxcol,) + size[1:], focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/frame.py", line 481, in render
body = self.body.render((maxcol, maxrow - ftrim - htrim), focus and self.focus_part == "body")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cac
hed_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/toot/tui/scroll.py", line 366, in render
ow_canv = ow.render(ow_size, focus)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/toot/tui/scroll.py", line 61, in render
canv_full = ow.render(ow_size, focus)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/padding.py", line 340, in render
canv = self._original_widget.render((maxcol,) + size[1:], focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/pile.py", line 873, in render
canv = w.render(w_size, focus=focus and item_focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/pile.py", line 873, in render
canv = w.render(w_size, focus=focus and item_focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwidgets/text_embed.py", line 217, in render
partial_canv, tail = self._uw_embed(
^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwidgets/text_embed.py", line 405, in _uw_embed
canv.pad_trim_left_right(-line_index, 0)
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/canvas.py", line 799, in pad_trim_left_right
shards = shards_trim_sides(shards, trim_left, cols)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/toot/0.43.0_1/libexec/lib/python3.12/site-packages/urwid/canvas.py", line 1124, in shards_trim_sides
raise ValueError(cols)
ValueError: -124