API sometimes returns empty results

 
  • API sometimes returns empty results

    I'm making calls to the geo api to determine the list of weeks for which data for a given city is available. Sometimes when I make these calls I get empty results. Any idea why?

    You might be able to re-create the problem by trying the same thing as me. Here's an example call taken directly from the api documentation:

    http://ws.audioscrobbler.com/2.0/?method=geo.getmetroweeklychartlist&api_key=b25b959554ed76058ac220b7b2e0a026

    If you paste that into your browswer's address bar, you might get the correct results. However, if you try refreshing that page, you might get empty results.

    I noticed this problem when running code that worked fine a few months ago. Has something changed? Could this be related to a rate limit? Note that in the above example I'm using the api key used in the example, and the problem occurs consistently for me regardless of whether I refresh quickly or slowly. This indicates that it's not a rate-limit problem related to my account, but I'm not sure what's going on so maybe it's related to rate-limiting after all.

    • tburny a dit :...
    • Forum Moderator
    • 24 avr. 2012, 10h46m
    I can confirm that. Really weird!

    Combo.fm: Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
    • snyde1 a dit :...
    • Abonné
    • 25 avr. 2012, 3h45m
    Can't confirm this case, but I have had calls time out and (as I recall) return blanks.

    Improve your view of Last.fm - add some User Scripts.
    Did I hear that right? Mondegreens - for the misheard word. Like Odds? Can't get better than Even Odds!

    Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
    • tburny a dit :...
    • Forum Moderator
    • 25 avr. 2012, 10h00m
    You have to press F5 a few times fast in a row

    Combo.fm: Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
  • I am still running into this problem when I use my own API Key.

    I suspect I'm making too many requests too quickly. In this case it's fair for last.fm to send me empty responses, however the "status" of these responses should not be "ok". The response should indicate that there was an error at least, and ideally it would say that I was making too many requests, and indicate the rate limit.

    By the way, what is the rate limit?

    • snyde1 a dit :...
    • Abonné
    • 26 avr. 2012, 5h03m
    tburny said:
    You have to press F5 a few times fast in a row
    The page just refreshes for me.

    Improve your view of Last.fm - add some User Scripts.
    Did I hear that right? Mondegreens - for the misheard word. Like Odds? Can't get better than Even Odds!

    Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
  • Bump.

    This problem does seem to have gone away for now, but still there is no explanation for it, and it might come back to break things later.

    What is the rate limit on the API--exactly how is it calculated? Earlier, I was able to get away with a few hundred thousand requests a day, spaced out evenly (approx 3/second). Is that rate fine?

    • tburny a dit :...
    • Forum Moderator
    • 29 août 2012, 17h10m
    Does this problem still exist?

    Combo.fm: Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
Les utilisateurs anonymes ne peuvent pas poster de messages. Merci de vous connecter ou de créer un compte pour pouvoir intervenir dans les forums.