Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Session name with number at end won't load #183

Copy link
Copy link
@borisjoffe

Description

@borisjoffe
Issue body actions

tmux 2.3
tmuxp 1.2.2

Repro steps:

  • Freeze a current tmux session
  • Change session_name to test in the yaml file
  • Duplicate the yaml file
  • Change session_name to test2 in the duplicate file
  • Use tmuxp to load test2 in a terminal window
  • Use tmuxp to load test in a different window

Expected result:

  • Both sessions load

Actual result:

  • Second session shows message "test is already running. Attach?"
  • If you try to attach to the session, it crashes with the following stacktrace:
Traceback (most recent call last):
  File "/bin/tmuxp", line 11, in <module>
    load_entry_point('tmuxp==1.2.2', 'console_scripts', 'tmuxp')()
  File "/usr/lib/python3.5/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.5/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 511, in command_load
    load_workspace(config[-1], **tmux_options)
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 253, in load_workspace
    reattach(builder.session)
  File "/usr/lib/python3.5/site-packages/tmuxp/cli.py", line 244, in reattach
    session.attach_session()
AttributeError: 'NoneType' object has no attribute 'attach_session'

#132 was a similar issue except with dots instead of numbers

Also, if the number is within the session_name, it works correctly, and if test is loaded before test2, it also works correctly.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.