viniarck / rofi-tmux

:heavy_check_mark: rft (rofi-tmux). Quickly switches tmux sessions, windows and tmuxinator projects
MIT License
26 stars 4 forks source link

AttributeError: 'Session' object has no attribute 'attached'. Did you mean: 'attach'? #9

Closed LRDPRDX closed 4 months ago

LRDPRDX commented 4 months ago

Installed with:

pipx install rofi-tmux

Trying to use it:

rft ss

I get the following error :

Traceback (most recent call last):
  File "/home/lparadox/.local/bin/rft", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/core.py", line 1685, in invoke
    super().invoke(ctx)
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/rft/bin/main.py", line 18, in main
    ctx.obj = rft.RFT(debug=debug)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/rft/rft.py", line 31, in __init__
    self._register_cur_sessions()
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/rft/rft.py", line 93, in _register_cur_sessions
    self._cur_tmux_s = self._get_cur_session()
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lparadox/.local/pipx/venvs/rofi-tmux/lib/python3.11/site-packages/rft/rft.py", line 99, in _get_cur_session
    if str(s.attached) != '0':
           ^^^^^^^^^^
AttributeError: 'Session' object has no attribute 'attached'. Did you mean: 'attach'?

System: Ubuntu 23.10

viniarck commented 4 months ago

@LRDPRDX, It's been fixed. I've just released a new version (0.4).

Try reinstalling it again with pipx install rofi-tmux

LRDPRDX commented 4 months ago

@viniarck, thank you. The error is gone. But :) I got the other one :) I might have missed it but is it possible to use it without having i3 wm ? I'm using awesome.

viniarck commented 4 months ago

@viniarck, thank you. The error is gone. But :) I got the other one :) I might have missed it but is it possible to use it without having i3 wm ? I'm using awesome.

Cool. Unfortunately, at the moment the only WM supported is i3. The code has been structured to eventually support other WMs though, basically, it needs to subclass and implement this WindowManager class. I'd be happy to accept a pull request to support awesome.