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

discogs-client: Add authentication #1027

Closed
swpeter opened this issue Oct 22, 2014 · 4 comments
Closed

discogs-client: Add authentication #1027

swpeter opened this issue Oct 22, 2014 · 4 comments
Labels
bug bugs that are confirmed and actionable

Comments

@swpeter
Copy link

swpeter commented Oct 22, 2014

Hallo
is the discogs plugin partly defunct. I am getting the same error using beets 1.3.9 or 1.3.8
I have installed the discogs-client 2.0.2.
Below you wiil also find the complett the output of an import for an example that has no musicbrainz entry, but an entry at discogs . The relevant part states:
Discogs API Error: 401: You must authenticate to access this resource. (query: Oliver Lake Otherside)
(Suse 12.3/64 )
Thank you for looking at the Problem
Peter

beet  -v import "/ioerror/part2/Oliver Lake - Otherside (1988)"
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
Sending event: pluginload
library database: /beets/test.blb
library directory: /ioerror/part2/2tagged
Sending event: library_opened
Sending event: import_task_start
Looking up: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)
Tagging Oliver Lake - Otherside
No album IDs found.
Search terms: Oliver Lake - Otherside
Album might be VA: False
Discogs API Error: 401: You must authenticate to access this resource. (query: Oliver Lake Otherside)
Evaluating 5 candidates.
Candidate: Oliver Lake - Prophet
Success. Distance: <beets.autotag.hooks.Distance object at 0x87568cc>
Candidate: Oliver Lake - Impala
Success. Distance: <beets.autotag.hooks.Distance object at 0x865530c>
Candidate: Oliver Lake - Edge-Ing
Success. Distance: <beets.autotag.hooks.Distance object at 0x86bca4c>
Candidate: Oliver Lake - Holding Together
Success. Distance: <beets.autotag.hooks.Distance object at 0x86bc9cc>
Candidate: Red Hot Chili Peppers - Otherside
Success. Distance: <beets.autotag.hooks.Distance object at 0x8745fac>

/ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988) (6 items)
Finding tags for album "Oliver Lake - Otherside".
Candidates:
1. Red Hot Chili Peppers - Otherside (41.1%) (tracks, unmatched tracks, artist) (CD, 2000, SE, Warner Bros. Records)
2. Oliver Lake - Edge-Ing (40.0%) (tracks, album) (CD, 1994, IT, Black Saint)
3. Oliver Lake - Prophet (36.6%) (tracks, album) (Vinyl, 1981, IT, Black Saint)
4. Oliver Lake - Holding Together (36.5%) (tracks, album) (CD, 2010, Black Saint)
5. Oliver Lake - Impala (33.1%) (tracks, album) (Vinyl, 1987, US, Gramavision)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? I
Enter release ID: 1298848
Tagging Oliver Lake - Otherside
Searching for album ID: 1298848
Invalid MBID (1298848).
Searching Discogs for release 1298848
Evaluating 1 candidates.
Candidate: Oliver Lake - Otherside
/beets/src/beets/beets/autotag/hooks.py:202: RuntimeWarning: Argument <type 'str'> is not an unicode object. Passing an encoded string will likely have unexpected results.
  str2 = unidecode(str2)
Success. Distance: <beets.autotag.hooks.Distance object at 0x86552cc>
Tagging:
    Oliver Lake - Otherside
URL:
    http://www.discogs.com/Oliver-Lake-Otherside/release/1298848
(Similarity: 91.5%) (source, tracks) (Discogs, 2xVinyl, 1988, US, Gramavision)
Vinyl 1
 * Whitestone -> Stand (title)
Vinyl 2
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? A
Sending event: import_task_choice
Sending event: import_task_apply
Replacing item 4: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/01 Gano Club.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 2: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/05 Weave Song II.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 5: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/03 Whitestone.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 3: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/02 Whitestone.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 6: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/06 Dedicated To Dolphy.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 1: /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/04 Hymn For The Old Year.mp3
Sending event: database_change
Sending event: database_change
Sending event: item_removed
6 of 6 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Reimported album: added 1413977661.1, flexible attributes [] from album 1 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)
Reimported item added 1413977661.1 from item 4 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/01 Gano Club.mp3
Reimported item flexible attributes [] from item 4 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/01 Gano Club.mp3
Sending event: database_change
Reimported item added 1413977661.1 from item 2 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/05 Weave Song II.mp3
Reimported item flexible attributes [] from item 2 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/05 Weave Song II.mp3
Sending event: database_change
Reimported item added 1413977661.1 from item 5 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/03 Whitestone.mp3
Reimported item flexible attributes [] from item 5 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/03 Whitestone.mp3
Sending event: database_change
Reimported item added 1413977661.1 from item 3 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/02 Whitestone.mp3
Reimported item flexible attributes [] from item 3 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/02 Whitestone.mp3
Sending event: database_change
Reimported item added 1413977661.1 from item 6 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/06 Dedicated To Dolphy.mp3
Reimported item flexible attributes [] from item 6 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/06 Dedicated To Dolphy.mp3
Sending event: database_change
Reimported item added 1413977661.1 from item 1 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/04 Hymn For The Old Year.mp3
Reimported item flexible attributes [] from item 1 for /ioerror/part2/Oliver Lake - Otherside (1988)/Oliver Lake - Otherside (1988)/04 Hymn For The Old Year.mp3
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: import_task_files
Sending event: album_imported
Sending event: import
Sending event: cli_exit
@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Oct 22, 2014
@sampsyo
Copy link
Member

sampsyo commented Oct 22, 2014

Thanks for the report. This is interesting; we haven't seen anything like it before.

Can you give a little more context? Does this happen reliably for this album? (If you run it again, do you get the same error?) Does it happen for other albums?

If it is deterministic, can you help us reproduce the bug—for example, by sharing the album that triggers the bug?

@offbeatadam
Copy link

I’ve seen it on every import now.

Discogs API Error: 401: You must authenticate to access this resource. (query: Miles Davis Kind Of Blue)

I don’t think there were any changes at discogs…

Now, I do notice that the 401 is possible on the Images resources.

http://www.discogs.com/developers/#page:images,header:images-image

I can’t really tell if this is happening at the discogs query or if possible its happening at the discogs image search (if thats one of the locations that is searched in?)

In any case, I have seen it for every album I’ve imported starting with the last update I did to beets.

On Oct 22, 2014, at 11:11 AM, Adrian Sampson notifications@github.com wrote:

Thanks for the report. This is interesting; we haven't seen anything like it before.

Can you give a little more context? Does this happen reliably for this album? (If you run it again, do you get the same error?) Does it happen for other albums?

If it is deterministic, can you help us reproduce the bug—for example, by sharing the album that triggers the bug?


Reply to this email directly or view it on GitHub.

@sampsyo sampsyo changed the title discogs-client: Discogs API Error: 401 discogs-client: Add authentication Oct 22, 2014
@sampsyo sampsyo added bug bugs that are confirmed and actionable and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels Oct 22, 2014
@sampsyo
Copy link
Member

sampsyo commented Oct 22, 2014

Thanks for following up.

It looks like Discogs is now requiring authentication with a Discogs account to do searches. They turned off anonymous searching a few days ago.

We can't really fault Discogs for this—they announced the change four months ago! We just weren't paying attention to the announcement thread. Lesson learned.

Anyway, we now need to do a significant amount of engineering to add OAuth to the Discogs client. Until then, it won't work and I suggest disabling it.

@swpeter
Copy link
Author

swpeter commented Oct 22, 2014

It is happening at every album query for discogs. Providing the discogs-id, as in the example above, it is possible to tag the album.
Thank you for the quick answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

3 participants