|
Posts: 3
Registered: Apr 24, 2012
|
Posted: 2012-09-17 16:51:28
|
Hi and thx first of all for a sensational project! But, a few months ago an issue arose, then apparently went away and is now back again - without code changes on my side.
Calling "track/upload" works fine (Status "success" and an Id is returned). Then i call "track/analyze" and get a "pending" result. I've tried with tracks that used to work without problems, but now I can't seem to get past the "pending" state. I understand that it may take a while to analyze the songs, but even subsequent calls (after waiting a few seconds) always end up "pending" What has changed or what am I doing wrong? Any hints would be greatly appreciated! I've seen some really quick and valuable support on this forum, so my expectations are high ;)
P.S. I'd be glad to send you a link, if you want to try the track for yourself, but unfortunately cannot post the URL publicly.
|
|
|
Posts: 4
Registered: May 22, 2010
|
Posted: 2012-09-18 09:44:45
|
I'm having the same issue. Making API calls manually using this script always returns "pending":
{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "track": {"status": "pending", "title": "La Búsqueda de Ianna (Waltz)", "artist": "Epic Soul Factory", "audio_md5": "c64f584a1e426d098ac905345fab5b8d", "bitrate": 245, "id": "TRZRBDL139D8C125D5", "samplerate": 44100, "md5": "d131183dd9b228f43aa56bf0661a6f9a"}}}
This happens even for songs whose hash I know should correspond to an existing analysis.
It seems that the Echonest Remix API wrappers are not subject to this bug, because this script succeeds.
|
|
|
Posts: 4
Registered: May 22, 2010
|
Posted: 2012-09-18 09:52:41
|
It looks like it might be related to the deprecation of wait=true 7 days ago (which is about how long I've been having this problem). From my understanding of the announcement and the API, the query for a song should still stop returning "pending" after a short while, though..
|
|
|
Posts: 914
Registered: Sep 08, 2008
|
Posted: 2012-09-18 12:39:59
|
Hey Mike and Lgrarron - I think the problem is that you are uploading a track and then analyzing a track. The upload will do the analysis for you automatically. The 'analyze' method is only needed if you wish to re-analyze a previously updated track (you may want to do this if we've updated the analyzer and you want the freshest analysis). What you should do instead is call track/upload to upload and start the analysis. This will return a track ID. Then call the track/profile method with the track ID. This returns (among other things) an analysis 'status'. When the 'status' is 'complete' you should be good to go. -- Paul
|
|
|
Posts: 4
Registered: May 22, 2010
|
Posted: 2012-09-19 02:13:17
|
Ah. So, I think I understand now that I was using the API incorrectly. By calling track/analyze, which has been changed not to wait, I was guaranteeing that the status is always made pending at the time of the API call. And track/profile doesn't have that issue, because it just queries for the status.
I had been relying on the old behaviour because it was the first thing that finally worked for me, but I know how to fix it now. Thanks.
|
|
|
Posts: 3
Registered: Apr 24, 2012
|
Posted: 2012-09-20 08:58:06
|
Thanks Paul for your quick response! I haven't had a chance to implement the changes, but it of course (after re-reading the "wait (Deprecated)" notice in the documentation) makes perfect sense.
|
|
|
Posts: 3
Registered: Apr 24, 2012
|
Posted: 2012-09-20 16:10:10
|
Wonderful! Changed "analyze" to "profile" and "post" to "get", wrapped it into a loop and all is well! Thanks again - you have no idea how helpful these functions are!
|
|