Closed TiBeN closed 9 years ago
Hi @TiBeN, I just pushed a fix on master. This time it won't crash but discogs won't return you any result.
Could you install the latest git version of beets and try again? To do so, type the following
# pip install git+https://github.com/sampsyo/beets.git@master
If you then run beets in verbose mode you'll have a message when the discogs API fails, something like discogs: Problem while searching for ...
. If you want to try again with the --verbose
flag and paste here the logs, I'll be able to see what was sent to discogs and therefore determine whether the problem is on our side or on theirs.
Hi, Having worked with the discogs API years ago i suspected an unstability related to it. I'll try and give you a feedback as soon as i return at home. Thanks
Thanks, @brunal (and @TiBeN). I thought I had found all the places where this exception could come up as of https://github.com/sampsyo/beets/commit/024778544024c52b82cb4ecd09b2cebbb231924c in relation to #1305, but I clearly missed one. The "right" place to fix this eventually is in the discogs library (c.f., https://github.com/discogs/discogs_client/issues/44) so we're stuck working around it for now.
Hi @brunal and @sampsyo,
I've tried using master (after uninstalled the previous version using pip uninstall
). I think the workaround works as expected as i did not had this error during my tests but I can't confirm because i now have this error everytime i launch the process (ie: my import process locked to this step) :
/home/tiben/media/aud-vrac/musique/Z/Zongamin/ED 007 - Bongo Song (3 items)
Tagging:
Zongamin - Bongo Song
URL:
http://musicbrainz.org/release/636c8510-7879-4ead-a69a-77f4cf477c41
(Similarity: 88.0%) (tracks) (12" Vinyl, 2005, FR, Ed Banger Records)
* Bongo Song (Mr Flash Remix) (#3) -> Bongo Song (Mr Flash Type C remix) (#2) (index, title)
* Bongo Song (Jacko Remix) (#2) (5:23) -> Bongo Song (Jackos Bongo Thong (Ripped in 2 Pieces) remix) (#3) (5:47) (title, index, length)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? A
Traceback (most recent call last):
File "/usr/local/bin/beet", line 9, in <module>
load_entry_point('beets==1.3.11', 'console_scripts', 'beet')()
File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 953, in main
_raw_main(args)
File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 943, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 876, in import_func
import_files(lib, paths, query)
File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 853, in import_files
session.run()
File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 316, in run
pl.run_parallel(QUEUE_SIZE)
File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 301, in run
out = self.coro.send(msg)
File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 183, in coro
func(*(args + (task,)))
File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 1236, in lookup_candidates
task.lookup_candidates()
File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 567, in lookup_candidates
autotag.tag_album(self.items)
File "/usr/local/lib/python2.7/dist-packages/beets/autotag/match.py", line 433, in tag_album
search_album, va_likely)
File "/usr/local/lib/python2.7/dist-packages/beets/autotag/hooks.py", line 565, in album_candidates
out.extend(plugins.candidates(items, artist, album, va_likely))
File "/usr/local/lib/python2.7/dist-packages/beets/plugins.py", line 344, in candidates
out.extend(plugin.candidates(items, artist, album, va_likely))
File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 141, in candidates
self.reset_auth()
File "/usr/local/lib/python2.7/dist-packages/beetsplug/discogs.py", line 86, in reset_auth
self.setup()
TypeError: setup() takes exactly 2 arguments (1 given)
To be precise, once i installed the master version, i was able to import somes records (5 or 6), having this error triggered one time or two but not blocking, up to this.
Another point is now each time i launch beet import
i'm prompted to go to discogs'url to authorise beets and copy paste code. With previous version i only did it once.
Hi, That crash is caused by a tentative of re-authorization on Discogs. I've fixed it. Could you try it?
Previously if the connection with discogs was lost no re-authorization would happen. Now it re-authorizes, but I have trouble understanding when Discogs ask for it (their implementation of oauth2 loosely follows any standard and does not match their API docs).
That new problem (setup
+ re-auth) is being discussed in #1345, so let's move further discussion there.
OK, I'll report now in the issue #1345. Thanks for your response.
Hi, I'm renaming my 100go mp3 collection using beets which is great for this purpose. Because i have a lot of not well known vynil EP mp3 rips, i mostly use the discogs plugin. But it crashes very often with this error. I give you two examples bellow.
Context informations: beets version 1.3.10 plugins: discogs
Command line used: beet import -l ~/doc/memos/beet-import-notes ./ Installed and up-to-date at time of writing (discogs plugin included) using pip