rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
554 stars 24 forks source link

AttributeError: module 'urwid' has no attribute 'decoration' #238

Closed ryusko2 closed 11 months ago

ryusko2 commented 11 months ago

Fresh install using pipx (recommended) in two different OSes:

Arch 5.15.94-1-lts Debian 6.5.3-1 (<-- transmission-daemon is running here)

I have an active ssh connection forwarding arch localhost:10001 to the Debian box, port 9091, that I have successfully transmission-remoted files to so I know I have a good tunnel with good rpc. Both machines are on my local network, so there are no firewall issues.

I first tried running stig on arch, creating ~/.config/stig/rc with the following contents:

set connect.host localhost (also tried 127.0.0.1) set connect.port 10001

Just in case stig wasn't finding that file, I also tried running stig -c ~/.config/stig/rc but encountered the same issue.

In both cases, I received the following error:

  File "/home/someone/.local/bin/stig", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/someone/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/__init__.py", line 25, in run
    main.run()
  File "/home/someone/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/main.py", line 102, in run
    if not tui.run(run_commands):
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/someone/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/main.py", line 30, in run
    from . import tuiobjects
  File "/home/someone/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/tuiobjects.py", line 22, in <module>
    from . import theme, urwidpatches  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/someone/.local/pipx/venvs/stig/lib/python3.11/site-packages/stig/tui/urwidpatches.py", line 277, in <module>
    urwid.decoration.remove_defaults = remove_defaults
    ^^^^^^^^^^^^^^^^
AttributeError: module 'urwid' has no attribute 'decoration' 

Then, to really make sure it wasn't a remote/ssh issue, I installed stig on the Debian machine, also using pipx, and ran it on that machine with defaults (and a good WebUI on localhost:9091, as transmission-daemon is set up with defaults), but I received the same AttributeError listed above.

Standing by to provide further clarification, if any is needed...

transmission-daemon 4.0.2 (2a57b17031) stig version 0.12.5a0

rndusr commented 11 months ago

Should be fixed in 0.12.6a0.

Thank you for the great report and sorry for the state this project is in.

It was just a compatibility issue with a recent releases of the stig's TUI library, urwid, which was dormant for years and had to be patched for newer Python versions. I forgot the patch and now the issue was fixed upstream, resulting in the exception you saw.