YetAnotherNerd / whatlastgenre

Improve genre metadata of audio files based on tags from various music sites.
http://yetanothernerd.github.io/whatlastgenre
MIT License
79 stars 20 forks source link

TypeError: sequence item 0: expected str instance, bytes found #19

Closed michaeltoohig closed 4 years ago

michaeltoohig commented 4 years ago

Just set up this plugin for beets using python3.7 and the py3 branch. If I do not use the verbose flag then everything works fine.

[michael:/mnt/e/Library]$ beet wlg -vv -f sister
whitelist: data/genres.txt (361 items)
tagsfile:  data/tags.txt (134 items)
wlg: ( 1/1) [############################################################] 100%
[beet] artist=45 Thieves / Calypso, album=Day-O Banana Boat Remix / Sister, date=2006
tagscoring min/avg/max (num) = 0.850/0.850/0.850 (2)
tag score   jungle 0.850
tag add     jungle
tag score   electronic 0.850
tag add     electronic
Discogs  album  got  2 of  2 tags for '45 thieves calypso day-o banana boat remix sister'
LastFM   error: Album not found
LastFM   album  got    no results for '45 thieves calypso day-o banana boat remix sister'
LastFM   artist use mbid '276598'.
LastFM   error: The artist you supplied could not be found
LastFM   error: The artist you supplied could not be found
LastFM   artist got    no results for '45 thieves calypso'
Best album  genres (2):
1.00 Jungle               1.00 Electronic
Best merged genres (2):
1.00 Jungle               0.50 Electronic
No artist tags
wlg: genres for album 45 Thieves / Calypso - Day-O Banana Boat Remix / Sister: Jungle, Electronic

2 different genres used this often:
   1 Jungle                  1 Electronic
Traceback (most recent call last):
  File "/home/michael/.local/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.9', 'console_scripts', 'beet')()
  File "/home/michael/.local/lib/python3.7/site-packages/beets-1.4.9-py3.7.egg/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/home/michael/.local/lib/python3.7/site-packages/beets-1.4.9-py3.7.egg/beets/ui/__init__.py", line 1253, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/michael/src/whatlastgenre/plugin/beets/beetsplug/wlg.py", line 112, in commanded
    self.wlg.print_stats(i)
  File "/home/michael/.local/lib/python3.7/site-packages/whatlastgenre-0.2.1-py3.7.egg/wlg/whatlastgenre.py", line 419, in print_stats
TypeError: sequence item 0: expected str instance, bytes found