Closed bb010g closed 5 years ago
Hi! Thanks for reporting. Can you check which version of discogs-client you have installed?
For example, I seem to have 2.2.1 installed under both Python 2 and 3 on my system:
$ pip freeze | grep discogs-client
discogs-client==2.2.1
$ pip3 freeze | grep discogs-client
discogs-client==2.2.1
And I can't seem to reproduce the problem in a straightforward way on either Python version.
I also note that we have a workaround in there, referring to #1051 and indirectly to https://github.com/discogs/discogs_client/issues/40, that is probably no longer necessary. This latest version of the library appears able to handle Unicode query inputs (in fact, it prefers them).
On the GitHub repository of discogs_client there's no tag for 2.2.1 version. Python pip though have a 2.2.1 version there. Is there another place? I've just made an issue to tag their release there 75
Good point; as far as I can tell, it's only on PyPI.
I'm also running Arch Linux, and am having the same problem, so I can probably help with the info part. If OP installed everything through the official repo and AUR, they'd have the same setup.
$ pacman -Qs discogs
local/python-discogs-client 2.2.0-2
local/python2-discogs-client 2.2.0-2
I'll try to see if I can get a package for 2.2.1 and report my findings
switching to 2.2.1 fixes the issue for me. I'll leave my temporary PKGBUILD here and notify the maintainer.
Good to know; thank you! And double thanks for notifying the package maintainer.
Meanwhile, I'll update our minimum version in setup.py to 2.2.1 from 2.1.0.
I think this can be closed now since it looks like Arch has the necessary versions:
2.2.1-3
2.2.2-1
Excellent news. Thanks for following up.
I have been getting this error lately.
discogs_client version: 2.3.12
Traceback (most recent call last):
File "/usr/bin/beet", line 33, in <module>
sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')())
File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1278, in main
_raw_main(args)
File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1265, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 960, in import_func
import_files(lib, paths, query)
File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 930, in import_files
session.run()
File "/usr/lib/python3.9/site-packages/beets/importer.py", line 341, in run
pl.run_parallel(QUEUE_SIZE)
File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 445, in run_parallel
six.reraise(exc_info[0], exc_info[1], exc_info[2])
File "/usr/lib/python3.9/site-packages/six.py", line 719, in reraise
raise value
File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 312, in run
out = self.coro.send(msg)
File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 194, in coro
func(*(args + (task,)))
File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1365, in lookup_candidates
task.lookup_candidates()
File "/usr/lib/python3.9/site-packages/beets/importer.py", line 653, in lookup_candidates
autotag.tag_album(self.items, search_ids=self.search_ids)
File "/usr/lib/python3.9/site-packages/beets/autotag/match.py", line 463, in tag_album
for matched_candidate in hooks.album_candidates(items,
File "/usr/lib/python3.9/site-packages/beets/plugins.py", line 582, in decorated
for v in generator(*args, **kwargs):
File "/usr/lib/python3.9/site-packages/beets/autotag/hooks.py", line 631, in album_candidates
for candidate in plugins.candidates(items, artist, album, va_likely,
File "/usr/lib/python3.9/site-packages/beets/plugins.py", line 391, in candidates
for candidate in plugin.candidates(items, artist, album, va_likely,
File "/usr/lib/python3.9/site-packages/beetsplug/discogs.py", line 190, in candidates
return self.get_albums(query)
File "/usr/lib/python3.9/site-packages/beetsplug/discogs.py", line 252, in get_albums
releases = self.discogs_client.search(query,
File "/usr/lib/python3.9/site-packages/discogs_client/client.py", line 134, in search
fields['q'] = ' '.join(query)
TypeError: sequence item 0: expected str instance, bytes found
Hi! Just checking: is this still occurring on the latest source version?
Looks like it is not. Thanks
I have been getting this error lately.
Setup
* OS: Arch Linux * Python version: 3.9.5 * beets version: 1.4.9.r1031.cbc045f1c * Turning off plugins made problem go away (yes/no): yes: discogs
discogs_client version: 2.3.12
Traceback (most recent call last): File "/usr/bin/beet", line 33, in <module> sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')()) File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1278, in main _raw_main(args) File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1265, in _raw_main subcommand.func(lib, suboptions, subargs) File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 960, in import_func import_files(lib, paths, query) File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 930, in import_files session.run() File "/usr/lib/python3.9/site-packages/beets/importer.py", line 341, in run pl.run_parallel(QUEUE_SIZE) File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 445, in run_parallel six.reraise(exc_info[0], exc_info[1], exc_info[2]) File "/usr/lib/python3.9/site-packages/six.py", line 719, in reraise raise value File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 312, in run out = self.coro.send(msg) File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 194, in coro func(*(args + (task,))) File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1365, in lookup_candidates task.lookup_candidates() File "/usr/lib/python3.9/site-packages/beets/importer.py", line 653, in lookup_candidates autotag.tag_album(self.items, search_ids=self.search_ids) File "/usr/lib/python3.9/site-packages/beets/autotag/match.py", line 463, in tag_album for matched_candidate in hooks.album_candidates(items, File "/usr/lib/python3.9/site-packages/beets/plugins.py", line 582, in decorated for v in generator(*args, **kwargs): File "/usr/lib/python3.9/site-packages/beets/autotag/hooks.py", line 631, in album_candidates for candidate in plugins.candidates(items, artist, album, va_likely, File "/usr/lib/python3.9/site-packages/beets/plugins.py", line 391, in candidates for candidate in plugin.candidates(items, artist, album, va_likely, File "/usr/lib/python3.9/site-packages/beetsplug/discogs.py", line 190, in candidates return self.get_albums(query) File "/usr/lib/python3.9/site-packages/beetsplug/discogs.py", line 252, in get_albums releases = self.discogs_client.search(query, File "/usr/lib/python3.9/site-packages/discogs_client/client.py", line 134, in search fields['q'] = ' '.join(query) TypeError: sequence item 0: expected str instance, bytes found
Need to report that the same error persists on the following more recent setup:
Would the dev reopen the issue and investigate? Many thanks.
Can you please try on the latest source version?
Can you please try on the latest source version?
Thanks the speedy response, can confirm that the source-installation works with both 2.3.12-1 (from Arch Linux's repository) and 2.3.12 (from pip) of the discog-client.
For future reference and the baffled newcomers: the official how-to documenting various methods for installing from source.
Problem
On Python 3, an import with discogs enabled fails.
Running this command in verbose (
-vv
) mode:Led to this problem:
Setup
My configuration (output of
beet config
) is: