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

tmuxp load AssertionError or loads session only partially #860

Closed
mirosval opened this issue Jan 4, 2023 · 16 comments
Closed

tmuxp load AssertionError or loads session only partially #860

mirosval opened this issue Jan 4, 2023 · 16 comments
Labels
bug Something isn't working p5-urgent 🔥 Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@mirosval
Copy link

mirosval commented Jan 4, 2023

Step 1: Provide a summary of your problem

Previously working setup now only opens the first window when loading a new session using tmuxp load

Step 2: Provide tmuxp details

`tmuxp debug-info`

-------------------------
environment:
	dist: macOS-13.1-arm64-arm-64bit
	arch: arm64
	uname: Darwin; REDACTED.local; 22.2.0
	version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
-------------------------
python version: 3.11.1 (main, Dec 23 2022, 09:28:24) [Clang 14.0.0 (clang-1400.0.29.202)]
system PATH: REDACTED
tmux version: 3.3
libtmux version: 0.18.2
tmuxp version: 1.24.0
tmux path: /opt/homebrew/bin/tmux
tmuxp path: /opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp
shell: /opt/homebrew/bin/zsh
-------------------------
tmux sessions:
	dotfiles: 1 windows (created Tue Jan  3 12:56:29 2023) (attached)
	tracking: 1 windows (created Wed Jan  4 11:54:03 2023)

tmux windows:
	1: dotfiles* (2 panes) [426x85] [layout fc8c,426x85,0,0{212x85,0,0,1,213x85,213,0,2}] @1 (active)

tmux panes:
	1: [212x85] [history 21/50000, 447700 bytes] %1
	2: [213x85] [history 1464/50000, 718639 bytes] %2 (active)

tmux global options:
	@net_speed_interfaces en0
	@plugin jimeh/tmux-themepack
	@powerline-color-activity-1 colour75
	@powerline-color-black-1 black
	@powerline-color-grey-1 colour233
	@powerline-color-grey-2 colour235
	@powerline-color-grey-3 colour238
	@powerline-color-grey-4 colour240
	@powerline-color-grey-5 colour243
	@powerline-color-grey-6 colour245
	@powerline-color-main-1 colour39
	@powerline-color-main-2 colour81
	@powerline-color-main-3 colour75
	@powerline-status-bg colour233
	@powerline-status-fg colour240
	@powerline-status-left-area-left-bg colour39
	@powerline-status-left-area-left-fg colour233
	@powerline-status-left-area-middle-bg colour240
	@powerline-status-left-area-middle-fg colour233
	@powerline-status-left-area-right-bg colour235
	@powerline-status-left-area-right-fg colour240
	@powerline-status-left-bg colour233
	@powerline-status-left-fg colour243
	@powerline-status-right-area-left-bg colour235
	@powerline-status-right-area-left-fg colour240
	@powerline-status-right-area-middle-bg colour240
	@powerline-status-right-area-middle-fg colour233
	@powerline-status-right-area-right-bg colour245
	@powerline-status-right-area-right-fg colour233
	@powerline-status-right-bg colour233
	@powerline-status-right-fg colour243
	@resurrect-restore-script-path /Users/mirosval/.tmux/plugins/tmux-resurrect/scripts/restore.sh
	@resurrect-save-script-path /Users/mirosval/.tmux/plugins/tmux-resurrect/scripts/save.sh
	@resurrect-strategy-irb default_strategy
	@resurrect-strategy-mosh-client default_strategy
	@resurrect-strategy-nvim session
	@resurrect-strategy-vim session
	@theme-clock-mode-colour colour39
	@theme-clock-mode-style 24
	@theme-display-panes-active-colour colour245
	@theme-display-panes-colour colour233
	@theme-message-bg colour39
	@theme-message-command-bg colour39
	@theme-message-command-fg black
	@theme-message-fg black
	@theme-mode-bg colour39
	@theme-mode-fg black
	@theme-pane-active-border-bg default
	@theme-pane-active-border-fg colour39
	@theme-pane-border-bg default
	@theme-pane-border-fg colour238
	@theme-status-bg colour233
	@theme-status-fg colour240
	@theme-status-interval 1
	@theme-status-justify centre
	@theme-status-left "#[fg=colour233,bg=colour39,bold] #S #[fg=colour39,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"
	@theme-status-left-bg colour233
	@theme-status-left-fg colour243
	@theme-status-left-length 40
	@theme-status-left-prefix ''
	@theme-status-left-suffix ''
	@theme-status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour233,bg=colour245,bold] #H "
	@theme-status-right-bg colour233
	@theme-status-right-fg colour243
	@theme-status-right-length 150
	@theme-status-right-prefix ''
	@theme-status-right-suffix ''
	@theme-window-status-activity-bg colour233
	@theme-window-status-activity-fg colour75
	@theme-window-status-current-bg colour39
	@theme-window-status-current-fg black
	@theme-window-status-current-format " #I:#W#F "
	@theme-window-status-current-prefix ''
	@theme-window-status-current-suffix ''
	@theme-window-status-format " #I:#W#F "
	@theme-window-status-prefix ''
	@theme-window-status-separator ''
	@theme-window-status-suffix ''
	@themepack powerline/block/cyan
	@themepack-status-left-area-left-format "#S"
	@themepack-status-left-area-left-prefix ''
	@themepack-status-left-area-left-suffix ''
	@themepack-status-left-area-middle-format "#(whoami)"
	@themepack-status-left-area-middle-prefix ''
	@themepack-status-left-area-middle-suffix ''
	@themepack-status-left-area-right-format "#I:#P"
	@themepack-status-left-area-right-prefix ''
	@themepack-status-left-area-right-suffix ''
	@themepack-status-right-area-left-format "%H:%M:%S"
	@themepack-status-right-area-left-prefix ''
	@themepack-status-right-area-left-suffix ''
	@themepack-status-right-area-middle-format "%d-%b-%y"
	@themepack-status-right-area-middle-prefix ''
	@themepack-status-right-area-middle-suffix ''
	@themepack-status-right-area-right-format "#H"
	@themepack-status-right-area-right-prefix ''
	@themepack-status-right-area-right-suffix ''
	@themepack-window-status-current-format "#I:#W#F"
	@themepack-window-status-current-prefix ''
	@themepack-window-status-current-suffix ''
	@themepack-window-status-format "#I:#W#F"
	@themepack-window-status-prefix ''
	@themepack-window-status-suffix ''
	activity-action other
	assume-paste-time 1
	base-index 1
	bell-action any
	default-command "reattach-to-user-namespace -l /opt/homebrew/bin/zsh"
	default-shell /opt/homebrew/bin/zsh
	default-size 80x24
	destroy-unattached off
	detach-on-destroy on
	display-panes-active-colour colour245
	display-panes-colour colour233
	display-panes-time 1000
	display-time 4000
	history-limit 50000
	key-table root
	lock-after-time 0
	lock-command "lock -np"
	message-command-style fg=black,bg=colour39
	message-style fg=black,bg=colour39
	mouse on
	prefix C-b
	prefix2 None
	renumber-windows on
	repeat-time 500
	set-titles off
	set-titles-string "#S:#I:#W - \"#T\" #{session_alerts}"
	silence-action other
	status on
	status-bg default
	status-fg default
	status-format[0] "#[align=left range=left #{E:status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]#[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} #{E:window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{E:window-status-current-style},default},#{E:window-status-current-style},#{E:window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}#[nolist align=right range=right #{E:status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]"
	status-format[1] "#[align=centre]#{P:#{?pane_active,#[reverse],}#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
	status-interval 1
	status-justify centre
	status-keys emacs
	status-left "#[fg=colour232,bg=colour255,bold] #S #[fg=colour255,bg=colour250,nobold]#[fg=0,bg=colour250] #(whoami) #[fg=colour250,bg=colour245]#[fg=0,bg=colour245] #I:#P #[fg=colour245,bg=colour240]#[fg=0,bg=colour240] %b %d %H:%M:%S #[fg=colour240,bg=colour233,nobold]"
	status-left-length 100
	status-left-style fg=colour243,bg=colour233
	status-position bottom
	status-right "#[fg=colour245,bg=colour233]#[fg=0,bg=colour245] #(diffmetrik --metric download) #(diffmetrik --metric upload) #[fg=colour250,bg=colour245]#[fg=0,bg=colour250] bat: #(~/.dotfiles/scripts/battery.sh)%%  #[fg=colour255,bg=colour250,bold]#[fg=colour0,bg=colour255]#(~/.dotfiles/scripts/spotify.sh)"
	status-right-length 150
	status-right-style fg=colour243,bg=colour233
	status-style fg=colour240,bg=colour233
	update-environment[0] DISPLAY
	update-environment[1] KRB5CCNAME
	update-environment[2] SSH_ASKPASS
	update-environment[3] SSH_AUTH_SOCK
	update-environment[4] SSH_AGENT_PID
	update-environment[5] SSH_CONNECTION
	update-environment[6] WINDOWID
	update-environment[7] XAUTHORITY
	visual-activity off
	visual-bell off
	visual-silence off
	word-separators "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~"

tmux window options:
	cursor-colour none
	cursor-style default
	aggressive-resize on
	allow-passthrough off
	allow-rename off
	alternate-screen on
	automatic-rename on
	automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],}"
	clock-mode-colour colour39
	clock-mode-style 24
	copy-mode-match-style bg=cyan,fg=black
	copy-mode-current-match-style bg=magenta,fg=black
	copy-mode-mark-style bg=red,fg=black
	fill-character ''
	main-pane-height 24
	main-pane-width 80
	mode-keys vi
	mode-style fg=black,bg=colour39
	monitor-activity off
	monitor-bell on
	monitor-silence 0
	other-pane-height 0
	other-pane-width 0
	pane-active-border-style fg=colour39,bg=default
	pane-base-index 1
	pane-border-format "#{?pane_active,#[reverse],}#{pane_index}#[default] \"#{pane_title}\""
	pane-border-indicators colour
	pane-border-lines single
	pane-border-status off
	pane-border-style fg=colour238,bg=default
	pane-colours
	popup-style default
	popup-border-style default
	popup-border-lines single
	remain-on-exit off
	remain-on-exit-format "Pane is dead (#{?#{!=:#{pane_dead_status},},status #{pane_dead_status},}#{?#{!=:#{pane_dead_signal},},signal #{pane_dead_signal},}, #{t:pane_dead_time})"
	scroll-on-clear on
	synchronize-panes off
	window-active-style default
	window-size latest
	window-style default
	window-status-activity-style fg=colour75,bg=colour233
	window-status-bell-style reverse
	window-status-current-format " #I:#W#F "
	window-status-current-style fg=black,bg=colour39
	window-status-format " #I:#W#F "
	window-status-last-style default
	window-status-separator ''
	window-status-style default
	wrap-search on
	xterm-keys on

Step 3: Describe the problem:

Steps to reproduce:

Have a file like this:

session_name: some name
windows:
  - window_name: a
    layout: main-vertical
    options:
      main-pane-width: 50%
    shell_command_before: cd ~/work/a
    panes:
      - nvim
      - neofetch
  - window_name: b
    layout: main-vertical
    options:
      main-pane-width: 50%
    shell_command_before: cd ~/work/b
    panes:
      - nvim
      - neofetch

Do

tmuxp load ~/.config/tmuxp/some_name.yml

Observed Results:

Traceback (most recent call last):
  File "/opt/homebrew/bin/tmuxp", line 8, in <module>
    sys.exit(cli.cli())
             ^^^^^^^^^
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/cli/__init__.py", line 134, in cli
    command_load(
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/cli/load.py", line 642, in command_load
    load_workspace(
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/cli/load.py", line 436, in load_workspace
    _load_attached(builder, detached)
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/cli/load.py", line 184, in _load_attached
    builder.build()
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/workspace/builder.py", line 292, in build
    for window, window_config in self.iter_create_windows(session, append):
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp/workspace/builder.py", line 420, in iter_create_windows
    window.set_window_option(key, val)
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/libtmux/window.py", line 346, in set_window_option
    self.refresh()
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/libtmux/window.py", line 84, in refresh
    return super()._refresh(
           ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/libtmux/neo.py", line 174, in _refresh
    obj = fetch_obj(
          ^^^^^^^^^^
  File "/opt/homebrew/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/libtmux/neo.py", line 242, in fetch_obj
    assert obj is not None
           ^^^^^^^^^^^^^^^
AssertionError

Sometimes when I run the command immediately again, it works, but only creates the first window of the two

Expected Results:

Create and open the new session with both windows and all panels

@tony tony added the bug Something isn't working label Jan 4, 2023
@tony
Copy link
Member

tony commented Jan 4, 2023

@mirosval I am seeing this intermittently locally, as well. This seems like a serious issue.

Specifically - it happens on or around set_window_option.

If you have more information or find a way to reliably produce it - that would be a huge gift

@tony
Copy link
Member

tony commented Jan 4, 2023

@mirosval If you or anyone else encountering this removes their options, does it change anything?

@xbatist
Copy link

xbatist commented Jan 4, 2023

I have the same issue and removing the options, I can load the configuration and have a working session (without the adjustment specify by options obviously).

@mirosval
Copy link
Author

mirosval commented Jan 5, 2023

@tony I can confirm that commenting out options results in both windows and all commands setting up properly. Of course with the incorrect scaling now, as the main-pane-width is not applied.

@cmollet
Copy link

cmollet commented Jan 5, 2023

I am also experiencing this, but with a config that has no options block, just window_name, layout, and panes

@tony
Copy link
Member

tony commented Jan 5, 2023

I am also experiencing this, but with a config that has no options block, just window_name, layout, and panes

What's the traceback look like?

@tony
Copy link
Member

tony commented Jan 5, 2023

For anyone else posting, if you can provide your full config + tmuxp debug-info + the traceback that would be valuable!

@cmollet
Copy link

cmollet commented Jan 6, 2023

I am also experiencing this, but with a config that has no options block, just window_name, layout, and panes

What's the traceback look like?

WELL, I just tried it again and it worked, so I guess at best I can now say it is intermittent for me as well. However, the traceback posted by @mirosval looks very similar to what I remember, assert obj is not None was definitely the Exception.

tmuxp config
---

session_name: logs-vertical

windows:
  - window_name: host1
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host2
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host3
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host4
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host5
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host6
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host7
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host8
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host9
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host10
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host11
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
  - window_name: host12
    layout: tiled
    panes:
      - ssh -t REDACTED
      - ssh REDACTED
      - ssh -t REDACTED
tmuxp debug-info
-------------------------
environment:
	dist: macOS-13.1-x86_64-i386-64bit
	arch: x86_64
	uname: Darwin; REDACTED; 22.2.0
	version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64
-------------------------
python version: 3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]
system PATH: REDACTED
tmux version: 3.3
libtmux version: 0.18.2
tmuxp version: 1.24.0
tmux path: /usr/local/bin/tmux
tmuxp path: /usr/local/Cellar/tmuxp/1.24.0/libexec/lib/python3.11/site-packages/tmuxp
shell: /bin/zsh
-------------------------
tmux sessions:
	prod: 18 windows (created Thu Jan  5 09:23:19 2023)
	tasks: 3 windows (created Thu Jan  5 11:47:03 2023) (attached)
�[31m

�[39m
tmux windows:
	1: nvim (3 panes) [274x72] [layout 52eb,274x72,0,0{137x72,0,0,115,136x72,138,0[136x36,138,0,116,136x35,138,37,122]}] @44
	2: nvim- (3 panes) [274x72] [layout 78eb,274x72,0,0{137x72,0,0,118,136x72,138,0[136x36,138,0,120,136x35,138,37,121]}] @46
	3: nvim* (1 panes) [274x59] [layout b564,274x59,0,0,124] @48 (active)
�[31m

�[39m
tmux panes:
	1: [274x59] [history 10/10000, 40528 bytes] %124 (active)
�[31m

�[39m
tmux global options:
	@cpu_high_bg_color "#[bg=red]"
	@cpu_high_fg_color "#[fg=default]"
	@cpu_low_bg_color "#[bg=green]"
	@cpu_low_fg_color "#[fg=default]"
	@cpu_medium_bg_color "#[bg=yellow]"
	@cpu_medium_fg_color "#[fg=default]"
	@plugin laktak/extrakto
	activity-action other
	assume-paste-time 1
	base-index 1
	bell-action any
	default-command /bin/zsh
	default-shell /bin/zsh
	default-size 80x24
	destroy-unattached off
	detach-on-destroy on
	display-panes-active-colour colour33
	display-panes-colour colour166
	display-panes-time 1000
	display-time 2500
	history-limit 10000
	key-table root
	lock-after-time 0
	lock-command "lock -np"
	message-command-style bg=black,fg=yellow
	message-style bg=colour235,fg=colour166
	mouse off
	prefix C-a
	prefix2 None
	renumber-windows on
	repeat-time 500
	set-titles on
	set-titles-string "#S@#H"
	silence-action other
	status on
	status-bg default
	status-fg default
	status-format[0] "#[align=left range=left #{E:status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]#[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} #{E:window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{E:window-status-current-style},default},#{E:window-status-current-style},#{E:window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}#[nolist align=right range=right #{E:status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]"
	status-format[1] "#[align=centre]#{P:#{?pane_active,#[reverse],}#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
	status-interval 1
	status-justify left
	status-keys vi
	status-left "#[fg=green]#H #[fg=white]• #{cpu_bg_color}#{cpu_fg-color} #{cpu_icon}#{cpu_percentage} #[fg=white]• #[fg=green,bright]#[default]"
	status-left-length 50
	status-left-style default
	status-position bottom
	status-right "#{prefix_highlight} #[fg=green,bg=default,bright] #[fg=red,dim,bg=default]#[fg=white,bg=default]%a %k:%M#[default] #[fg=blue]%Y-%m-%d"
	status-right-length 140
	status-right-style default
	status-style bg=colour235,fg=colour136
	update-environment[0] DISPLAY
	update-environment[1] SSH_ASKPASS
	update-environment[2] SSH_AGENT_PID
	update-environment[3] SSH_CONNECTION
	update-environment[4] SSH_AUTH_SOCK
	update-environment[5] WINDOWID
	update-environment[6] XAUTHORITY
	update-environment[7] TERM
	visual-activity on
	visual-bell off
	visual-silence off
	word-separators "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~"
�[31m

�[39m
tmux window options:
	cursor-colour none
	cursor-style default
	aggressive-resize on
	allow-passthrough off
	allow-rename off
	alternate-screen on
	automatic-rename on
	automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],}"
	clock-mode-colour green
	clock-mode-style 24
	copy-mode-match-style bg=cyan,fg=black
	copy-mode-current-match-style bg=magenta,fg=black
	copy-mode-mark-style bg=red,fg=black
	fill-character ''
	main-pane-height 24
	main-pane-width 80
	mode-keys vi
	mode-style bg=brightwhite,fg=blue
	monitor-activity on
	monitor-bell on
	monitor-silence 0
	other-pane-height 0
	other-pane-width 0
	pane-active-border-style fg=colour240
	pane-base-index 1
	pane-border-format "#{?pane_active,#[reverse],}#{pane_index}#[default] \"#{pane_title}\""
	pane-border-indicators colour
	pane-border-lines single
	pane-border-status off
	pane-border-style fg=colour235
	pane-colours
	popup-style default
	popup-border-style default
	popup-border-lines single
	remain-on-exit off
	remain-on-exit-format "Pane is dead (#{?#{!=:#{pane_dead_status},},status #{pane_dead_status},}#{?#{!=:#{pane_dead_signal},},signal #{pane_dead_signal},}, #{t:pane_dead_time})"
	scroll-on-clear on
	synchronize-panes off
	window-active-style default
	window-size latest
	window-style default
	window-status-activity-style reverse
	window-status-bell-style reverse
	window-status-current-format "#I:#W#{?window_flags,#{window_flags}, }"
	window-status-current-style fg=brightblue
	window-status-format "#I:#W#{?window_flags,#{window_flags}, }"
	window-status-last-style default
	window-status-separator " "
	window-status-style fg=colour244,bg=default
	wrap-search on
	xterm-keys on
�[31m

�[39m

@tony
Copy link
Member

tony commented Jan 6, 2023

Thank you!

However, the traceback posted by @mirosval looks very similar to what I remember, assert obj is not None was definitely the Exception.

if by chance it happens against and you have the full traceback, it'd be helpful to see!

tony added a commit that referenced this issue Jan 7, 2023
Improvement to fetch_objs() for
#860
tony added a commit that referenced this issue Jan 7, 2023
Improvement to fetch_objs() for
#860
tony added a commit that referenced this issue Jan 7, 2023
Improvement to `fetch_objs()` for
#860
@tony tony added the p5-urgent 🔥 Fix build-breaking bugs affecting most users, should be released ASAP (priority) label Jan 7, 2023
@tony
Copy link
Member

tony commented Jan 7, 2023

@cmollet @mirosval @xbatist I released v1.24.1 (with libtmux 1.18.3)

If you try this, let me know what the traceback looks like (it should be more detailed)

@xbatist
Copy link

xbatist commented Jan 7, 2023

Running :

$ tmuxp --version
=> tmuxp 1.24.1, libtmux 0.18.3

The resulting traceback is the following :

Traceback (most recent call last):
  File "/usr/bin/tmuxp", line 8, in <module>
    sys.exit(cli.cli())
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/cli/__init__.py", line 134, in cli
    command_load(
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/cli/load.py", line 642, in command_load
    load_workspace(
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/cli/load.py", line 448, in load_workspace
    _load_attached(builder, detached)
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/cli/load.py", line 184, in _load_attached
    builder.build()
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/workspace/builder.py", line 292, in build
    for window, window_config in self.iter_create_windows(session, append):
  File "/home/xbatist/.local/lib/python3.10/site-packages/tmuxp/workspace/builder.py", line 420, in iter_create_windows
    window.set_window_option(key, val)
  File "/home/xbatist/.local/lib/python3.10/site-packages/libtmux/window.py", line 346, in set_window_option
    self.refresh()
  File "/home/xbatist/.local/lib/python3.10/site-packages/libtmux/window.py", line 84, in refresh
    return super()._refresh(
  File "/home/xbatist/.local/lib/python3.10/site-packages/libtmux/neo.py", line 175, in _refresh
    obj = fetch_obj(
  File "/home/xbatist/.local/lib/python3.10/site-packages/libtmux/neo.py", line 244, in fetch_obj
    raise ObjectDoesNotExist(
libtmux._internal.query_list.ObjectDoesNotExist: Could not find window_id=@133 for list-windows

Let me know if you need more test.

@tony
Copy link
Member

tony commented Jan 7, 2023

@xbatist Can you post tmuxp -V and paste the config? (you can remove anything private, as long as it recreates the issue)

Does it happen consistently, or only sometimes?

@xbatist
Copy link

xbatist commented Jan 7, 2023

$ tmuxp -V
tmuxp 1.24.1, libtmux 0.18.3

Here is the config which generate consistent error when loading the config with tmuxp load <config>.

session_name: name
windows:
  - window_name: a
    options:
      main-pane-height: 10
    panes:
      - nvim
      - echo 'test'

tony added a commit to tmux-python/libtmux that referenced this issue Jan 7, 2023
tony added a commit to tmux-python/libtmux that referenced this issue Jan 7, 2023
tony added a commit that referenced this issue Jan 7, 2023
@tony
Copy link
Member

tony commented Jan 7, 2023

@cmollet @mirosval @xbatist If you try tmuxp v1.25.0 for libtmux v0.19.1, is anything better?

@xbatist
Copy link

xbatist commented Jan 7, 2023

All good on my side ! It's back to normal. Thanks a lot for your quick fix.

@tony
Copy link
Member

tony commented Jan 7, 2023

@xbatist This is excellent! Thank you for the information and testing!

@mirosval @cmollet I am going to close this now per v1.25.0 w/ libtmux v0.19.1. If you find it's still not working, let me know and I will re-open.

@tony tony closed this as completed Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p5-urgent 🔥 Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

No branches or pull requests

4 participants