tmuxp: ValueError: Session requires a `session_id`
I am getting the following error in all configurations. (I tried the config from the readme as well)
Traceback (most recent call last):
File "/home/vn-ki/.local/bin/tmuxp", line 11, in <module>
load_entry_point('tmuxp==1.4.0', 'console_scripts', 'tmuxp')()
File "/usr/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/cli.py", line 602, in command_load
load_workspace(config[-1], **tmux_options)
File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/cli.py", line 328, in load_workspace
builder.build()
File "/home/vn-ki/.local/lib/python3.6/site-packages/tmuxp/workspacebuilder.py", line 141, in build
session_name=self.sconf['session_name']
File "/home/vn-ki/.local/lib/python3.6/site-packages/libtmux/server.py", line 511, in new_session
session = Session(server=self, **session)
File "/home/vn-ki/.local/lib/python3.6/site-packages/libtmux/session.py", line 42, in __init__
raise ValueError('Session requires a `session_id`')
ValueError: Session requires a `session_id`
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 25 (7 by maintainers)
I ran into the same issue as the original bug report while using tmux 3.0a and tmuxp 1.5.4. Setting the following in
~/.bash_localeand then sourcing it at the end of my.bashrcfile resolved the issue.I have tmux installed as a compiled binary from the release page source, and tmuxp was installed via pip3, using
Python 3.5.2.I also encountered this problem, and after debugging, I found that the method
libtmux.server.Server._list_sessionsuses\tto slice different columns, but in some environments the data returned byproc.stderris not slice by\t.The fix is to change the sliced character to something else, e.g.
||||I too had this issue and I took the time to dig a bit deeper into it as I had one environment where I saw the expected (non-broken) behavior and another with the
ValueError: Session requires a 'session_id'problem.There is command that is ran via
subprocess(I believe) which invokestmuxto provide some information in a tab delimited format for parsing. Here’s a screenshot showing the command/syntax that is issued totmuxoutlined in red:This screenshot shows the output that is returned from that command (outlined in red) and as you can see it is not tab delimited.
The environment that was broken was a docker container, and as it turns out, I had been a bit lazy in its creation and skipped the locale generation part. After properly setting up all the locale and my shell’s
LANGenvironment variable toen_US.utf8, everything started working as expected.Analyzing the output again in the debugger shows the properly formatted string.
TL;DR - Check your locale settings and shell
LANGvariable as the stringlibtmuxis expecting to see when invokingtmuxis improperly formatted.