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

colors is compared as an int but set as a string #678

Open
sam-lunt opened this issue May 13, 2021 · 1 comment
Open

colors is compared as an int but set as a string #678

sam-lunt opened this issue May 13, 2021 · 1 comment

Comments

@sam-lunt
Copy link

I am running tmuxp 1.7.2 on Arch Linux. When I attempt to load a workspace, I see the following output:

% tmuxp load desktop
[Loading] /home/sam/dotfiles/shell/.config/tmuxp/desktop.yaml
Traceback (most recent call last):
  File "/usr/bin/tmuxp", line 33, in <module>
    sys.exit(load_entry_point('tmuxp==1.7.2', 'console_scripts', 'tmuxp')())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/tmuxp/cli.py", line 1096, in command_load
    load_workspace(config[-1], **tmux_options)
  File "/usr/lib/python3.9/site-packages/tmuxp/cli.py", line 684, in load_workspace
    if builder.session_exists(session_name) and not append:
  File "/usr/lib/python3.9/site-packages/tmuxp/workspacebuilder.py", line 107, in session_exists
    exists = self.server.has_session(session_name)
  File "/usr/lib/python3.9/site-packages/libtmux/server.py", line 372, in has_session
    proc = self.cmd('has-session', '-t%s' % target_session)
  File "/usr/lib/python3.9/site-packages/libtmux/server.py", line 127, in cmd
    raise ValueError('Server.colors must equal 88 or 256')
ValueError: Server.colors must equal 88 or 256

Inspecting the variables using pdb (python -m pdb /usr/bin/tmuxp load desktop) reveals that self.colors is set to the string '256' (or '88' if the -8 flag is passed) but libtmux is comparing the value against an integer literal (256 or 88).

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

Successfully merging a pull request may close this issue.

2 participants