Closed sammcj closed 9 years ago
It looks like the traceback may have gotten cut off (it's missing the exception). Any chance there's more to paste?
Hello,
I think I have the same issue. The complete traceback should be:
Traceback (most recent call last):
File "/opt/oparent/virtenv_beet/bin/beet", line 9, in <module>
load_entry_point('beets==1.3.11', 'console_scripts', 'beet')()
File "/home/oparent/repositories/beets/beets/ui/__init__.py", line 953, in main
_raw_main(args)
File "/home/oparent/repositories/beets/beets/ui/__init__.py", line 943, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/home/oparent/repositories/beets/beets/ui/commands.py", line 876, in import_func
import_files(lib, paths, query)
File "/home/oparent/repositories/beets/beets/ui/commands.py", line 853, in import_files
session.run()
File "/home/oparent/repositories/beets/beets/importer.py", line 316, in run
pl.run_parallel(QUEUE_SIZE)
File "/home/oparent/repositories/beets/beets/util/pipeline.py", line 301, in run
out = self.coro.send(msg)
File "/home/oparent/repositories/beets/beets/util/pipeline.py", line 183, in coro
func(*(args + (task,)))
File "/home/oparent/repositories/beets/beets/importer.py", line 1236, in lookup_candidates
task.lookup_candidates()
File "/home/oparent/repositories/beets/beets/importer.py", line 567, in lookup_candidates
autotag.tag_album(self.items)
File "/home/oparent/repositories/beets/beets/autotag/match.py", line 436, in tag_album
search_album, va_likely)
File "/home/oparent/repositories/beets/beets/autotag/hooks.py", line 565, in album_candidates
out.extend(plugins.candidates(items, artist, album, va_likely))
File "/home/oparent/repositories/beets/beets/plugins.py", line 344, in candidates
out.extend(plugin.candidates(items, artist, album, va_likely))
File "/home/oparent/repositories/beets/beetsplug/discogs.py", line 141, in candidates
self.reset_auth()
File "/home/oparent/repositories/beets/beetsplug/discogs.py", line 86, in reset_auth
self.setup()
TypeError: setup() takes exactly 2 arguments (1 given)
The session
argument is not defined in the reset_auth
method. Passing None
removes the exception but then, the discogs plugin prompts for the token indefinitely.
I am using the latest discogs-client
package: 2.0.2
.
Thanks,
Hi,
the setup()
problem has just been fixed, please pull master.
I recently implemented re-authorization, since the plugin used to lose it and not ask for it. I'll have a further look at whether the problem comes from us, the discogs python client or the discogs server.
Hmmm, I see:
discogs: API Error: 401: You must authenticate to access this resource. (query: )
which comes from:
self._log.debug(u'API Error: {0} (query: {1})', e, query)
In my case, va_likely (album might be VA) = true, and I have no album title, which creates an empty query. That's probably why there's an error, and in turn why the plugin things the auth is no longer good, and tries to reauth?
PR #1351 sidesteps the problem, but other re-auth issues may arise.
It comes from discogs-client
and oauth2
. I actually have a fork of discogs-client
there which used oauthlib
instead and is python 2 & 3 compatible. The PR still hasn't been merged. I just pinged the owners again, and I think that if it's not merged soon it might be a good idea to move to the fork.
It looks like we can close this issue, although other problems clearly remain. Too bad the library is unmaintained.
The PR with discogs_client has been merged and a fresh install should use it, solving the re-auth problems presented here. I'm waiting for the discogs_client maintainers to produce a new tag (for a version newer that the current 2.0.2) and I'll specify it in beets' setup.py
.
Nice! Thanks, @brunal. I agree we should require the latest release when one is out to PyPI.
Done! Please open a new issue if you have a problem.
Config: