Skip to content

tmux version "next-2.9": TypeError: '<' not supported between instances of 'str' and 'int' #449

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

Closed
kaushalmodi opened this issue Oct 26, 2018 · 5 comments · Fixed by tmux-python/libtmux#172

Comments

@kaushalmodi
Copy link

Hello,

One of the 2 upgrades (python or tmux) broke tmuxp for me:

  • tmux next-2.9 (using the latest tmux built from master as of today)
  • Python 3.7.0

I uninstalled and reinstalled tmuxp using:

pip3 uninstall tmuxp
pip3 install --user tmuxp

But when I try to load a tmuxp config (as I always do, and worked), by doing tmuxp load servers -d, I get:

Traceback (most recent call last):
  File "/home/kmodi/.local/bin/tmuxp", line 11, in <module>
    load_entry_point('tmuxp==1.4.2', 'console_scripts', 'tmuxp')()
  File "/home/kmodi/.local/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/kmodi/.local/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/kmodi/.local/lib/python3.7/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/home/kmodi/.local/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kmodi/.local/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/kmodi/.local/lib/python3.7/site-packages/tmuxp/cli.py", line 403, in cli
    has_minimum_version()
  File "/home/kmodi/.local/lib/python3.7/site-packages/libtmux/common.py", line 514, in has_minimum_version
    if get_version() < LooseVersion(TMUX_MIN_VERSION):
  File "/home/kmodi/stow/pkgs/python/3.7.0/lib/python3.7/distutils/version.py", line 52, in __lt__
    c = self._cmp(other)
  File "/home/kmodi/stow/pkgs/python/3.7.0/lib/python3.7/distutils/version.py", line 337, in _cmp
    if self.version < other.version:
TypeError: '<' not supported between instances of 'str' and 'int'
@kaushalmodi
Copy link
Author

Maybe tmuxp doesn't like the new non-int version string of tmux? tmux/tmux@bc6211c

@kaushalmodi kaushalmodi changed the title TypeError: '<' not supported between instances of 'str' and 'int' tmux version "next-2.9": TypeError: '<' not supported between instances of 'str' and 'int' Oct 26, 2018
@kaushalmodi
Copy link
Author

I confirm this bug in tmuxp. After I reverted that specific commit in tmux, and rebuilt it, tmuxp works fine.

sloria added a commit to sloria/libtmux that referenced this issue Jan 25, 2019
tmuxp currently crashes when used with
tmux next-2.9 (the latest Homebrew release).

```
TypeError: '<' not supported between instances of 'str' and 'int'
```

This patch avoids the error by making `get_version()`
strip the "next-" part of the version.

closes tmux-python/tmuxp#449
@sloria
Copy link

sloria commented Jan 25, 2019

I also ran into this using tmux next-2.9 (the latest Homebrew release). The issue is in libtmux. I sent a PR tmux-python/libtmux#172 and verified that it works .

tony pushed a commit to tmux-python/libtmux that referenced this issue Jan 25, 2019
tmuxp currently crashes when used with
tmux next-2.9 (the latest Homebrew release).

```
TypeError: '<' not supported between instances of 'str' and 'int'
```

This patch avoids the error by making `get_version()`
strip the "next-" part of the version.

closes tmux-python/tmuxp#449
@tony
Copy link
Member

tony commented Jan 25, 2019

@kaushalmodi @sloria I'm going to tag a release this weekend. Maybe sooner.

@tony
Copy link
Member

tony commented Jan 25, 2019

@kaushalmodi @sloria and anyone who reads this, tmux-python is looking for help: #290

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.

3 participants