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 crashes while load an config file #904

Open
2770862886 opened this issue Feb 4, 2024 · 6 comments
Open

tmuxp crashes while load an config file #904

2770862886 opened this issue Feb 4, 2024 · 6 comments

Comments

@2770862886
Copy link

2770862886 commented Feb 4, 2024

tmuxp 1.34.0, libtmux 0.25.0

Problem

tmuxp crashes in mac arm64 while load an config file:

Traceback (most recent call last):
File "/usr/local/bin/tmuxp", line 8, in
sys.exit(cli.cli())
^^^^^^^^^
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/tmuxp/cli/init.py", line 132, in cli
command_load(
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/tmuxp/cli/load.py", line 649, in command_load
load_workspace(
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/tmuxp/cli/load.py", line 460, in load_workspace
_load_attached(builder, detached)
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/tmuxp/cli/load.py", line 193, in _load_attached
builder.build()
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/tmuxp/workspace/builder.py", line 235, in build
session = self.server.new_session(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/tmuxp/1.34.0/libexec/lib/python3.12/site-packages/libtmux/server.py", line 481, in new_session
raise exc.LibTmuxException(proc.stderr)
libtmux.exc.LibTmuxException: ['no current client']

And with details:

log.txt

with config

session_name: foo
windows:
- layout: main-vertical
  options:
    main-pane-width: 160
  panes:
  - blank
  - blank
  - blank

After exec: tmuxp load foo.yaml it crashes. Any help with be appreciate.

@hpauluss
Copy link

I have the same problem, starting about a week ago.

The problem is similar, but I get a different error.

The following call uses the same foo yaml sample:

$ TMUX_CONFIGDIR=$HOME/.tmux.conf tmuxp load tmuxp-foo.yaml
[Loading] /Users/hpa/tmuxp-foo.yaml
Traceback (most recent call last):
  File "/opt/local/bin/tmuxp", line 8, in <module>
    sys.exit(cli.cli())
             ^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/cli/__init__.py", line 144, in cli
    command_load(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/cli/load.py", line 652, in command_load
    load_workspace(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/cli/load.py", line 462, in load_workspace
    _load_attached(builder, detached)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/cli/load.py", line 194, in _load_attached
    builder.build()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/workspace/builder.py", line 288, in build
    for window, window_config in self.iter_create_windows(session, append):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tmuxp/workspace/builder.py", line 358, in iter_create_windows
    w1 = session.active_window
         ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Session' object has no attribute 'active_window'. Did you mean: 'attached_window'?

@tony
Copy link
Member

tony commented Mar 13, 2024

I can't give this my attention until the evenings / weekend, however: libtmux​ is likely out of sync with tmuxp​.

Make sure you have the latest version of libtmux​ (right now, that's 0.32.0. If you are using 0.25.0, that is way out of date). If you update it, is anything different?

How are you downloading tmuxp? via package manager? pip?

@hpauluss
Copy link

Hello,

I'm using the latest version of libtmux:

# port installed | grep libtmux
  py312-libtmux @0.30.2_0 (active)

I use macports package manager on MacOS 14.4.

Maybe a Mac-related problem?

Apart from the tmuxp problems (or libtmux), tmux is working fine.

@tony
Copy link
Member

tony commented Mar 14, 2024 via email

@tony
Copy link
Member

tony commented Mar 16, 2024

@hpauluss It's late to bring this up, but I didn't realize what you reported has no connection the original post. It looks like you have a macports issue, and it's happening because the libtmux version is out of date with what tmuxp should be using.

You are welcome to make a new issue if you'd like to continue further on the macports issue.

@2770862886 Are you still getting the issue reported with the latest tmuxp / libtmux? I think there may be something in tmux scripts outside of tmuxp that are causing tmux to error. If you use tmuxp -f /dev/null file.yaml, does it still happen?

@hpauluss
Copy link

It was indeed a macports issue, which in the meantime has been resolved:

$ tmuxp --version
tmuxp 1.43.0, libtmux 0.35.0

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