ename_session_windows.py' returned 1 error on window switch
Closed this issue · 4 comments
sandrodz commented
Getting this error when switching between tmux windows on Mac:
/rename_session_windows.py' returned 1
ofirgall commented
This error is shown because the python script fails to run but it suppress stderr. Can you execute the script manually from a shell to see stderr?
sandrodz commented
❯ /Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py
Traceback (most recent call last):
File "/Users/sandro/Library/Python/3.11/lib/python/site-packages/libtmux/common.py", line 322, in __getattr__
val = self._info[self.formatter_prefix + key]
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'window_window_id'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 339, in <module>
main()
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 336, in main
rename_windows(server, options)
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 227, in rename_windows
panes_programs = get_panes_programs(current_session, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 211, in get_panes_programs
session_active_panes = get_session_active_panes(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 196, in get_session_active_panes
session_windows_ids = [window.window_id for window in session.windows]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sandro/.tmux/plugins/tmux-window-name/scripts/rename_session_windows.py", line 196, in <listcomp>
session_windows_ids = [window.window_id for window in session.windows]
^^^^^^^^^^^^^^^^
File "/Users/sandro/Library/Python/3.11/lib/python/site-packages/libtmux/common.py", line 327, in __getattr__
raise AttributeError(f"{self.__class__} has no property {key}")
AttributeError: <class 'libtmux.window.Window'> has no property window_id. Did you mean: '_window_id'?
ofirgall commented
It seems that libtmux
is outdated, can you upgrade it?
python3 -m pip install --user -U libtmux
sandrodz commented
yep that did the trick, thanks.