Ticket #2539 (closed bug: duplicate)

Opened 1 year ago

Last modified 1 year ago

Fail to retrieve an asin that exists in database.

Reported by: eesprit@free.fr Assigned to: matt
Priority: normal Milestone:
Component: python-musicbrainz2 Version:
Keywords: asin python musicbrainz2 Cc:
Browser: OS: Linux

Description

I'm currently playing with python-musicbrainz2, it's nice, but I found this strange problem.

I'm trying to get some info for differents release, using Artist Name and Album Title.

I face a case that doesn't behave correctly. I retrieve the release object fine, scored 100%, artist name is OK, album title is OK, and the id of the release is OK too. What is stange is that the Asin is None, but on the musicbrainz web server page the Asin exists.

Here is an example that illustrate it :


#! /usr/bin/python
# -*- coding: utf8 -*-
from musicbrainz2.webservice import Query, ReleaseFilter, Release, WebServiceError

q = Query()
releaseResults = None

try:

test_title = u"Nattf\xf6dd"
test_artist = u"Finntroll"
f = ReleaseFilter(title=test_title, artistName=test_artist, releaseTypes=(Release.TYPE_ALBUM, Release.TYPE_OFFICIAL), limit=5)
releaseResults = q.getReleases(f)

except WebServiceError, wse:

print "[ERROR]", wse


if releaseResults is not None and len(releaseResults) == 0:

print "[INFO] No result from Music Brainz, sorry."


print "[DEBUG] Number of results:", len(releaseResults)
for result in releaseResults:

my_release = result.release
print "[DEBUG] Artist:", my_release.artist.name
print "[DEBUG] Title:", my_release.title
print "[DEBUG] Score:", result.score
print "[DEBUG] ASIN:", my_release.asin
print "[DEBUG] ID:", my_release.id
print "[DEBUG] Verif URL:", my_release.id + ".html"


And here is the output :


[DEBUG] Number of results: 1
[DEBUG] Artist: Finntroll
[DEBUG] Title: Nattfödd
[DEBUG] Score: 100
[DEBUG] ASIN: None
[DEBUG] ID: http://musicbrainz.org/release/dce2a43e-d689-4d87-aab7-9c2c9e24ed50
[DEBUG] Verif URL: http://musicbrainz.org/release/dce2a43e-d689-4d87-aab7-9c2c9e24ed50.html


As you can see, ASIN is None. But if you go on the link given at the last output line, you can see that the ASIN exists (it's B000AAVFKO).

So what's the problem here ?

lib versions :


ii libmusicbrainz4-dev 2.1.4-1 Second generation incarnation of the CD Inde
ii libmusicbrainz4c2a 2.1.4-1 Second generation incarnation of the CD Inde
ii python-musicbrainz2 0.4.1-1 An interface to the MusicBrainz XML web serv


Anyway, many thanks for the good work !

Attachments

bug-example.py (0.9 kB) - added by eesprit@free.fr on 2007-03-17 16:55:19.
Python Script that illustrate the bug

Change History

2007-03-17 16:55:19 changed by eesprit@free.fr

  • attachment bug-example.py added.

Python Script that illustrate the bug

2007-03-17 18:30:49 changed by luks

  • status changed from new to closed.
  • resolution set to duplicate.

This is actually a bug in the database, and it's a duplicate of #2515.

2007-03-17 20:59:33 changed by matt

Thanks very much for your detailed bug report! As luks said, the web service currently doesn't return the ASINs for some albums, a problem that will hopefully be fixed soon.

If you're looking for a short-term solution: If a release has no ASIN, you can fall back on the AmazonAsin relationship (they have to be requested via ReleaseIncludes). Relationship handling is demonstrated in http://bugs.musicbrainz.org/browser/python-musicbrainz2/trunk/examples/getrelations.py

Feel free to ask questions in mb-devel in case you run into problems.

2007-03-18 12:16:06 changed by eesprit@free.fr

Ok, thanks for the quick answer.


Add/Change #2539 (Fail to retrieve an asin that exists in database.)




Action