beets icon indicating copy to clipboard operation
beets copied to clipboard

Musicbrainz query fails with error 400 for albums containing "/"

Open Trippler opened this issue 13 years ago • 2 comments

Hi

Beets fails constantly when trying to place the album "Voscillate / Night Goes On" by "Flux Pavilion"

Here is a communication dump between beets and the musicbrainz server:

GET /ws/2/release/?query=release%3A%28voscilate+%2F+night+goes+on%29+tracks%3A%282%29+artist%3A%28flux+pavilion%29&limit=5 HTTP/1.1 Accept-Encoding: identity Content-Length: 0 Host: musicbrainz.org Connection: close User-Agent: beets/1.1.0 python-musicbrainz-ngs/0.3 ( http://beets.radbox.org/ ) HTTP/1.1 400 Bad Request Date: Wed, 15 May 2013 15:53:26 GMT Content-Type: application/xml; charset=utf-8 Connection: close Server: nginx/0.7.65 ETag: "c493470b51d2f58d881d46ce6002e970" Content-Length: 191 Access-Control-Allow-Origin: * Search server could not complete query: Bad requestFor usage, please see: http://musicbrainz.org/development/mmd

If you remove the %27 (urlencoded "/") from the url it works fine

The url beets is trying to request: http://musicbrainz.org/ws/2/release/?query=release%3A%28voscilate+%2F+night+goes+on%29+tracks%3A%282%29+artist%3A%28flux+pavilion%29&limit=5

A quick fix would be to change it to: http://musicbrainz.org/ws/2/release/?query=release%3A%28voscilate+night+goes+on%29+tracks%3A%282%29+artist%3A%28flux+pavilion%29&limit=5 as it still gives a 100% match.

Trippler avatar May 15 '13 17:05 Trippler

Thanks for the detailed investigation. This error is due to a recent MusicBrainz API change; we had to make a change in python-musicbrainz-ngs to adapt: https://github.com/alastair/python-musicbrainz-ngs/commit/75e514e7419e717cc84cb435b13bacbad683a75d

If you can install that library from git, that should fix this problem. Hopefully we can do a new release of the library soon; otherwise, I'll need to change beets to drop slash characters entirely for now.

sampsyo avatar May 15 '13 17:05 sampsyo

That was quick! We have a new release of the library out now, so no need to check out from git any longer. https://github.com/alastair/python-musicbrainz-ngs/blob/master/CHANGES

sampsyo avatar May 15 '13 21:05 sampsyo