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

[tmux 2.1] and TmuxSessionExists on tmuxp load pomp.yml -2 #122

Closed
estin opened this Issue Oct 20, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@estin
Contributor

estin commented Oct 20, 2015

$ tmux -V
tmux 2.1

$ tmuxp -v
tmuxp 0.9.1

$ tmux list-sessions
2: 1 windows (created Tue Oct 20 15:17:58 2015) [140x45] (attached)

$ tmux has-session -t pomp
can't find session pomp

$ cat pomp.yml | grep session_name
session_name: pomp

$ tmuxp load pomp.yml -2
load /home/user/prj/pomp.yml
(I) [15:10:01] tmuxp.cli cli.load_workspace():270 Loading /home/user/prj/pomp.yml.
Session name pomp is already running. Attach? [Y/n] Y
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 271, in load_workspace
    builder.build()
  File "/usr/lib/python3.5/site-packages/tmuxp/workspacebuilder.py", line 119, in build
    self.sconf['session_name']
tmuxp.exc.TmuxSessionExists: Session name pomp is already running.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/tmuxp", line 9, in <module>
    load_entry_point('tmuxp==0.9.1', 'console_scripts', 'tmuxp')()
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 968, in main
    command_load(args)
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 420, in command_load
    load_workspace(file_cwd, args)
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 292, in load_workspace
    builder.session.switch_client()
AttributeError: 'NoneType' object has no attribute 'switch_client'

Sever.has_session does not check output can't find session

@robled

This comment has been minimized.

robled commented Oct 20, 2015

I've tested your patch and can confirm that it works with my installation of tmux 2.1.

@tony tony closed this in d75b1e2 Oct 21, 2015

@DXist

This comment has been minimized.

DXist commented Sep 15, 2016

I reproduce this issue when I answer 'yes' to '... is already running. Attach? [Y/n]:'

Traceback

Traceback (most recent call last):
  File "/usr/local/bin/tmuxp", line 11, in <module>
    sys.exit(cli.cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/cli.py", line 484, in command_load
    load_workspace(config[-1], **tmux_options)
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/cli.py", line 253, in load_workspace
    reattach(builder.session)
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/cli.py", line 241, in reattach
    session.switch_client()
AttributeError: 'NoneType' object has no attribute 'switch_client'

tmux version is 2.1
tmuxp version is 1.2.0

@DXist

This comment has been minimized.

DXist commented Sep 15, 2016

Sounds like the reason #132

tony added a commit that referenced this issue Sep 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment