You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`
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 invokes tmux to provide some information in a tab delimited format for parsing. Here's a screenshot showing the command/syntax that is issued to tmux outlined 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 LANG environment variable to en_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 LANG variable as the string libtmux is expecting to see when invoking tmux is improperly formatted.
@trodery Can you please post the output of locale command in bash. I have tested my locale and LANG variable and they all seem to be fine. Other softwares do not have any issue with my locale setting.
@mayanksuman If it possible to try doing LANG set to en_IN.UTF-8? Can you let me know the session name in unicode? (I guess just pasting it here would be sufficient). As well as python -V, tmux -V and tmuxp -V
Hence, I suspect that the tmuxp might not support any other English locale except en_US.UTF-8.
Potentially. I have a feeling it may be click or tmux wanting UTF-8.
@tony Unfortunately that was so long ago that I don't even remember what I was using it for at the time. It is no longer being used. Python was 3.6 but that's all I remember.
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_locale and then sourcing it at the end of my .bashrc file 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 know I have some locale issues when running tmuxp from Nixpkgs on Ubuntu, but still think this issue should not happen.
Here is how it can be reproduced (by setting LC_ALL=C):
$ cat test.yaml
session_name: issue-405
windows:
- panes:
- echo did it load properly or die with a python traceback?
$ LC_ALL=C tmuxp load ./test.yaml
[...]
ValueError: Session requires a `session_id`
I also encountered this problem, and after debugging, I found that the method libtmux.server.Server._list_sessions uses \t to slice different columns, but in some environments the data returned by proc.stderr is not slice by \t.
The fix is to change the sliced character to something else, e.g. ||||
Traceback (most recent call last):
File "/usr/bin/tmuxp", line 33, in
sys.exit(load_entry_point('tmuxp==1.9.4', 'console_scripts', 'tmuxp')())
File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/lib/python3.10/site-packages/tmuxp/cli.py", line 1096, in command_load
load_workspace(config[-1], **tmux_options)
File "/usr/lib/python3.10/site-packages/tmuxp/cli.py", line 683, in load_workspace
if builder.session_exists(session_name) and not append:
File "/usr/lib/python3.10/site-packages/tmuxp/workspacebuilder.py", line 107, in session_exists
self.session = self.server.find_where({'session_name': session_name})
File "/usr/lib/python3.10/site-packages/libtmux/common.py", line 316, in find_where
return self.where(attrs)[0]
File "/usr/lib/python3.10/site-packages/libtmux/common.py", line 347, in where
return list(filter(by, self.children))
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 185, in sessions
return self.list_sessions()
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 180, in list_sessions
return [Session(server=self, **s) for s in self._sessions]
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 180, in
return [Session(server=self, **s) for s in self._sessions]
File "/usr/lib/python3.10/site-packages/libtmux/session.py", line 57, in init
raise ValueError('Session requires a session_id')
ValueError: Session requires a session_id
I also encountered this problem, and after debugging, I found that the method libtmux.server.Server._list_sessions uses \t to slice different columns, but in some environments the data returned by proc.stderr is not slice by \t.
The fix is to change the sliced character to something else, e.g. ||||
If you use the prerelease version of tmuxp and libtmux, does passing env LIBTMUX_TMUX_FORMAT_SEPARATOR="|||" tmuxp load [session] work?
Note that the session still seems to start when giving that session_id error, cause when I start it after I did the locale thing, it ask to attach to a running session.
This works in st-term, but in lxterminal, I get strange border characters
@grammoboy2 I notice its arch. Is this distro fully configured yet? Arch has a lot of manual setup involved. It may be more of a general terminal troubleshooting issue than a tmuxp one. Not sure yet. Maybe its the locale not being setup.
Activity
mayanksuman commentedon Dec 26, 2018
The same error occurs for me. I am using following versions of programs/libraries.
tmuxp 1.4.2
libtmux 0.8.0
python 3.6.8
tmux 2.8
I have also checked with git master (@03de018) version of tmuxp, the problem still exist.
trodery commentedon Mar 22, 2019
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.mayanksuman commentedon Mar 25, 2019
@trodery Can you please post the output of
localecommand in bash. I have tested my locale and LANG variable and they all seem to be fine. Other softwares do not have any issue with my locale setting.My locale is set to
Hence, I suspect that the
tmuxpmight not support any other English locale excepten_US.UTF-8.trodery commentedon Mar 25, 2019
Here's the output prior to moving to an English locale:
The only other problem I experienced was with
clickwhich demanded a UTF-8 locale.rawsp33d commentedon Jul 9, 2019
I have this problem, but didn't used to. The only thing I know of that changed somewhat recently was tmux itself, which is now
2.9a.sica07 commentedon Dec 13, 2019
I have the very same problem since last evening (after a system update)
trodery commentedon Dec 13, 2019
@sica07 What's the output of the
localecommand in bash?tony commentedon Dec 15, 2019
@mayanksuman If it possible to try doing
LANGset toen_IN.UTF-8? Can you let me know the session name in unicode? (I guess just pasting it here would be sufficient). As well aspython -V,tmux -Vandtmuxp -VPotentially. I have a feeling it may be click or tmux wanting UTF-8.
http://click.palletsprojects.com/en/5.x/python3/#python-3-surrogate-handling
@trodery Can you let me know the session name being used ? As well as
python -V,tmux -Vandtmuxp -V?@rosshadden @sica07 Can you let me know the output of
locale,tmux -V,tmuxp -Vandpython -V?tony commentedon Dec 15, 2019
@vn-ki Can you show your session yaml file,
locale,python -V,tmux -V,tmuxp -Vand the command you're using to load the file?trodery commentedon Dec 17, 2019
@tony Unfortunately that was so long ago that I don't even remember what I was using it for at the time. It is no longer being used. Python was 3.6 but that's all I remember.
sica07 commentedon Dec 19, 2019
@tony
em-winterschon commentedon Mar 10, 2020
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.bjornfor commentedon Mar 14, 2020
I know I have some locale issues when running tmuxp from Nixpkgs on Ubuntu, but still think this issue should not happen.
Here is how it can be reproduced (by setting
LC_ALL=C):dAnjou commentedon Nov 20, 2020
Hi, I'm having the same problem.
localeenv | grep "^LC"env | grep "^LANG"Here's a screencast of what is happening:

And here's the code of my script:
Kxrr commentedon May 11, 2021
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.
||||grammoboy2 commentedon Mar 13, 2022
Same here:
Traceback (most recent call last):
File "/usr/bin/tmuxp", line 33, in
sys.exit(load_entry_point('tmuxp==1.9.4', 'console_scripts', 'tmuxp')())
File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/lib/python3.10/site-packages/tmuxp/cli.py", line 1096, in command_load
load_workspace(config[-1], **tmux_options)
File "/usr/lib/python3.10/site-packages/tmuxp/cli.py", line 683, in load_workspace
if builder.session_exists(session_name) and not append:
File "/usr/lib/python3.10/site-packages/tmuxp/workspacebuilder.py", line 107, in session_exists
self.session = self.server.find_where({'session_name': session_name})
File "/usr/lib/python3.10/site-packages/libtmux/common.py", line 316, in find_where
return self.where(attrs)[0]
File "/usr/lib/python3.10/site-packages/libtmux/common.py", line 347, in where
return list(filter(by, self.children))
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 185, in sessions
return self.list_sessions()
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 180, in list_sessions
return [Session(server=self, **s) for s in self._sessions]
File "/usr/lib/python3.10/site-packages/libtmux/server.py", line 180, in
return [Session(server=self, **s) for s in self._sessions]
File "/usr/lib/python3.10/site-packages/libtmux/session.py", line 57, in init
raise ValueError('Session requires a
session_id')ValueError: Session requires a
session_idtony commentedon Mar 13, 2022
@grammoboy2 Can you also provide the configuration you're using and
tmuxp debug-infogrammoboy2 commentedon Mar 14, 2022
session_name: 3-panes
windows:
layout: main-vertical
shell_command_before:
panes:
debug.txt
tony commentedon Mar 14, 2022
If you use the prerelease version of tmuxp and libtmux, does passing
env LIBTMUX_TMUX_FORMAT_SEPARATOR="|||" tmuxp load [session]work?pip install --user --upgrade --pre tmuxp libtmuxtony commentedon Mar 14, 2022
@grammoboy2 Thank you
Output of
locale,env | grep "^LC",env | grep "^LANG"grammoboy2 commentedon Mar 14, 2022
$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
$ env | grep "^LC"
no output
$ env | grep "^LANG"
LANG=C
tony commentedon Mar 14, 2022
@grammoboy2 Does setting this work? #405 (comment)
grammoboy2 commentedon Mar 14, 2022
That works, this works too:
$ unset LANG
$ source /etc/profile.d/locale.sh
Note that the session still seems to start when giving that session_id error, cause when I start it after I did the locale thing, it ask to attach to a running session.
This works in st-term, but in lxterminal, I get strange border characters
grammoboy2 commentedon Mar 14, 2022
lxterminal

tony commentedon Mar 14, 2022
@grammoboy2 I notice its arch. Is this distro fully configured yet? Arch has a lot of manual setup involved. It may be more of a general terminal troubleshooting issue than a tmuxp one. Not sure yet. Maybe its the
localenot being setup.Does this work?
tmuxp load [session name/file]I believe instead of
LANG=C,LC_CTYPE="C"and so on, you may want to useLANG=en_US.UTF-8.