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

Crash while parsing query part containing only a dash #1605

Closed
bengadbois opened this issue Sep 15, 2015 · 2 comments
Closed

Crash while parsing query part containing only a dash #1605

bengadbois opened this issue Sep 15, 2015 · 2 comments

Comments

@bengadbois
Copy link

$ beet ls Rusko - Fifteen Years of Hospital Records - Everday [Netsky VIP Mix]
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1140, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1130, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 972, in list_func
    list_items(lib, decargs(args), opts.album)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 967, in list_items
    for item in lib.items(query):
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 1256, in items
    return self._fetch(Item, query, sort or self.get_default_item_sort())
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 1221, in _fetch
    query, parsed_sort = parse_query_parts(query, model_cls)
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 1119, in parse_query_parts
    model_cls, non_path_parts, prefixes
  File "/usr/local/lib/python2.7/dist-packages/beets/dbcore/queryparse.py", line 198, in parse_sorted_query
    s = sort_from_strings(model_cls, sort_parts)
  File "/usr/local/lib/python2.7/dist-packages/beets/dbcore/queryparse.py", line 163, in sort_from_strings
    sort.add_sort(construct_sort_part(model_cls, part))
  File "/usr/local/lib/python2.7/dist-pbeets version 1.3.14
no plugins loadedackages/beets/dbcore/queryparse.py", line 136, in construct_sort_part
    assert field, "field is missing"
AssertionError: field is missing

beets version 1.3.14
no plugins loaded
Python 2.7.6

Ask if you need me to run other things to provide additional details; I'm not familiar with python or the beets implementation.

@sampsyo sampsyo changed the title assert failed at runtime Crash while parsing query part containing only a dash Sep 15, 2015
@sampsyo
Copy link
Member

sampsyo commented Sep 15, 2015

Thanks! The problem seems to be the dash. I can reproduce this with just:

$ beet ls -

Investigating.

@sampsyo
Copy link
Member

sampsyo commented Sep 15, 2015

Should be fixed now. Thanks again for reporting.

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