Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urwid 2.4.2 and higher break stig #244

Open
mfonville opened this issue Jan 27, 2024 · 5 comments
Open

urwid 2.4.2 and higher break stig #244

mfonville opened this issue Jan 27, 2024 · 5 comments

Comments

@mfonville
Copy link

mfonville commented Jan 27, 2024

When stig wasn't working with the latest urwid, I tried several versions to pinpoint which had the breaking changes, which is 2.4.2

Trace:

Traceback (most recent call last):
  File "/home/maarten/.local/bin/stig", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/__init__.py", line 25, in run
    main.run()
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/main.py", line 102, in run
    if not tui.run(run_commands):
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/main.py", line 30, in run
    from . import tuiobjects
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/tuiobjects.py", line 107, in <module>
    logwidget = LogWidget(height=int(objects.localcfg['tui.log.height']),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/logger.py", line 45, in __init__
    self._scrollable = Scrollable(self._pile)
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/maarten/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/scroll.py", line 46, in __init__
    raise ValueError('Not a fixed or flow widget: %r' % widget)
ValueError: Not a fixed or flow widget: <Pile widget>
@rndusr
Copy link
Owner

rndusr commented Jan 29, 2024 via email

@mfonville
Copy link
Author

I have stig installed with pipx, but because earlier I had hit issue #238 I had explicitly injected a certain version of urwid.
When I ran pipx upgrade with --include-injected for stig, urwid also got an update and I noticed the incompatibility.

I now removed urwid from the explicit injections and indeed it correctly retains 2.2.* :-)

rsekman added a commit to rsekman/stig-ekman-git-PKGBUILD that referenced this issue Feb 3, 2024
@Soundtoxin
Copy link

Ran into this same issue after an Arch update recently. I was using stig-git from the AUR previously, so just uninstalled that with yay -R stig-git and then installed stig with pipx install stig and it seemed to work right away with my same config and launching the tui as usual (in case it helps the next person to come across this problem save a few minutes).

Long live stig!

@mfonville
Copy link
Author

Great that stig now works with more recent urwid.
If I start stig since the latest release, I get this notification at startup (but stig works fine):

/home/maarten/.local/pipx/venvs/stig/lib/python3.12/site-packages/urwid/widget/grid_flow.py:81: GridFlowWarning: Size is smaller than cell width (-1 < 20)
  super().__init__(self.generate_display_widget((self._cache_maxcol,)))

@rndusr
Copy link
Owner

rndusr commented Jun 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants