Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Getting a 403 error forbidden from #386

adbu33 opened this Issue · 16 comments

First off great job on headphones, it works awesome.

Keep getting this error after only adding a few artists to headphones.

2011-11-08 22:25:44 WARNING Attempt to query MusicBrainz for boston failed: HTTP Error 403: Forbidden

I have to wait for awhile then I am able to add more artists, but then receive the same error after adding ~5 artists. Is there something im doing wrong or is headphones quering musicbrainz for too much information?


Getting the same error. I am hoping that it is just a temporary issue with MusicBrainz.


Same error today.
Version: "8d80c6d1b6de7f20d8d24388e6609b65ae1f5744"

WARNING Attempt to query MusicBrainz for Bruno Mars failed: HTTP Error 403: Forbidden

I have two installations and both have the same problem now. Few days ago there was no problem.


Version 8d80c6d


haven't added anything in a few weeks or so, but I'm gettin the same error today. Seems to be for anything headphones searches for


+1 - installed for the first time yesterday..... thought I'd done something wrong till I found this thread.


Same thing here. First time I test the application.
Every artist it searches causes an entry like this in the log:
WARNING: Attempt to retrieve artist information from MusicBrainz failed for artistid: ... Sleeping 5 seconds
together with this one:
WARNING: Attempt to query MusicBrainz for ... failed: HTTP Error 403: Forbidden

What is strange is, I am able to query musicbrainz via the web service manually, eg pointing my browser to:
turns up an xml result.
I assume it is this web API that is used, haven't had the time to have a look at the source yet.




Please see [1] for instructions on how to fix this. AFAIK, this policy change is a result of heavy web service requests [2] coming from some applications.



Does headphones happen to query MB intensively at a particular time of the day? If so, it might very well be actually the culprit of the load problems :/


It seems that MusicBrainz rejects those requests because of a not compliant user agent.

userAgent is defined in (under headphones/lib/musicbrainz2).
After line 249 i added a new line which appends a URL to the user agent:
userAgent = 'python-musicbrainz/' + musicbrainz2.version
userAgent = userAgent + ' ( )'

After removing webservice.pyc and a restart, it works for me.

Hope that helps!


pkrauer that worked perfectly, thanks!


thx pkrauer



Please see my comment on the pull request; there is an updated version of python-musicbrainz2 that can deal with setting a proper User-Agent without you needing to play around with custom patches to your libraries, which I'm sure you'd prefer to avoid :)


I've seen it. Thanks for the information.


I guess you can close this one and keep #445


@rembo10 rembo10 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.