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 with db queries #5578

Closed
arsaboo opened this issue Jan 3, 2025 · 3 comments
Closed

TypeError with db queries #5578

arsaboo opened this issue Jan 3, 2025 · 3 comments

Comments

@arsaboo
Copy link
Contributor

arsaboo commented Jan 3, 2025

Ran into this today.

$ beet ls -f '$spotify_track_popularity - $plex_userrating - $album - $title - $plex_lastviewedat - $plex_ratingkey - $spotify_album_id' spotify_track_popularity- album:"Call Me Bae"
Traceback (most recent call last):
  File "/home/arsaboo/.local/bin/beet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1870, in main
    _raw_main(args)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1849, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1603, in list_func
    list_items(lib, decargs(args), opts.album)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1598, in list_items
    for item in lib.items(query):
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/dbcore/db.py", line 841, in __iter__
    objects = self.sort.sort(list(self._get_objects()))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/dbcore/query.py", line 1007, in sort
    return sorted(objs, key=key, reverse=not self.ascending)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'int'

This may be related to the recent db PRs.
cc: @snejus @valrus

@valrus
Copy link
Contributor

valrus commented Jan 3, 2025

Unless you're using a cutting-edge unreleased version of beets, I believe this is the same issue as #5512, and #5570 fixes it. But that fix hasn't been released yet.

@arsaboo
Copy link
Contributor Author

arsaboo commented Jan 3, 2025

I am using the @snejus fixup-matching branch. The master is messed up until #5571 is merged.

@arsaboo
Copy link
Contributor Author

arsaboo commented Jan 4, 2025

Actually, it was fixed in the latest build... I'm sorry for the false warning.

@arsaboo arsaboo closed this as completed Jan 4, 2025
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