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

TypeError: unorderable types: LexerMeta() < LexerMeta() #8

Closed
bentglasstube opened this issue Oct 14, 2013 · 4 comments
Closed

TypeError: unorderable types: LexerMeta() < LexerMeta() #8

bentglasstube opened this issue Oct 14, 2013 · 4 comments

Comments

@bentglasstube
Copy link
Contributor

Got this output after updating today:

Traceback (most recent call last):
  File "/home/alan/.vim/bundle/vim-wakatime/plugin/packages/wakatime/wakatime-cli.py", line 21, in <module>
    sys.exit(wakatime.main(sys.argv))
  File "/home/alan/.vim/bundle/vim-wakatime/plugin/packages/wakatime/wakatime/__init__.py", line 195, in main
    stats = get_file_stats(args.targetFile)
  File "/home/alan/.vim/bundle/vim-wakatime/plugin/packages/wakatime/wakatime/stats.py", line 53, in get_file_stats
    'language': guess_language(file_name),
  File "/home/alan/.vim/bundle/vim-wakatime/plugin/packages/wakatime/wakatime/stats.py", line 31, in guess_language
    lexer = guess_lexer_for_filename(file_name, f.read(512000))
  File "/home/alan/.vim/bundle/vim-wakatime/plugin/packages/wakatime/wakatime/packages/pygments3/pygments/lexers/__init__.py", line 191, in guess_lexer_for_filename
    result.sort()
TypeError: unorderable types: LexerMeta() < LexerMeta()
@bentglasstube
Copy link
Contributor Author

For reference:

$ grep 'VERSION =' $HOME/.vim/bundle/vim-wakatime/plugin/wakatime.vim
let s:VERSION = '1.2.2'
$ vim --version |head -2
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  3 2013 19:58:40)
Included patches: 1-16
$ python2 --version
Python 2.7.5

And from vim:

:python import sys; print(sys.version)
2.7.5 (default, Sep 6 2013, 09:55:21)
[GCC 4.8.1 20130725 (prerelease)]

@alanhamlett
Copy link
Member

Fixed with b72894f

If you're using Vundle, type :BundleUpdate in your Vim.

@bentglasstube
Copy link
Contributor Author

Incredible response time, I was still trying to fork the repo to look into it myself. Thanks a bunch.

@alanhamlett
Copy link
Member

You're very welcome :)

It's a bug in pygments, a third party library, so I'm just catching all errors from that library and ignoring them.

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

No branches or pull requests

2 participants