New issue 73 by MerwanWi...@gmail.com: API Error 5 every time an original
file is analyzed - analysis is broken
http://code.google.com/p/echo-nest-remix/issues/detail?id=73
Steps:
1. Analyze an original sound file
Result: API Error 5 every time a file is analyzed
Expected Result: The sound file is uploaded and analyzed correctly.
Using: Remix 1.3b on Python 2.6.6 on Windows XP.
Please provide any additional information below.
CODE:
import echonest.audio as audio
# Easy wrapper around mp3 decoding and Echo Nest analysis
audio_file = audio.LocalAudioFile("input.wav")
# You can manipulate the beats in a song as a native python list
beats = audio_file.analysis.beats
beats.reverse()
# And render the list as a new audio file!
audio.getpieces(audio_file, beats).encode("output.mp3")
ERROR DUMP:
Computed MD5 of file is 7c9bf28862f68a6c1ab9071787ca0160
Probing for existing analysis
Echo Nest API Error 5: The Identifier specified does not exist:
7c9bf28862f68a6c1ab9071787ca0160
Analysis not found. Uploading...
Traceback (most recent call last):
File "reverse.py", line 4, in <module>
audio_file = audio.LocalAudioFile("the_suburbs.wav")
File "c:\python26\lib\site-packages\echonest\audio.py", line 849, in
__init__
tempanalysis = AudioAnalysis(filename)
File "c:\python26\lib\site-packages\echonest\audio.py", line 95, in
__init__
self.pyechonest_track = track.track_from_filename(path_or_identifier)
File "c:\python26\lib\site-packages\pyechonest\track.py", line 128, in
track_from_filename
return track_from_file(open(filename), filetype)
File "c:\python26\lib\site-packages\pyechonest\track.py", line 120, in
track_from_file
return _track_from_string(file_object.read(), filetype)
File "c:\python26\lib\site-packages\pyechonest\track.py", line 114, in
_track_from_string
return _upload(param_dict, data = audio_data)
File "c:\python26\lib\site-packages\pyechonest\track.py", line 92, in
_upload
result = util.callm('track/upload', param_dict, POST = True,
socket_timeout = 300, data = data)
File "c:\python26\lib\site-packages\pyechonest\util.py", line 163, in
callm
f = conn.getresponse()
File "c:\python26\lib\httplib.py", line 990, in getresponse
response.begin()
File "c:\python26\lib\httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "c:\python26\lib\httplib.py", line 355, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine
The problem is most likely that you're uploading a .wav file for analysis.
The Echo Nest does not allow users to upload files larger than 50 MB. This
limit isn't documented anywhere, so you couldn't have known. I'll see that
the file size limit gets added to the API documentation. For now, your best
bet is to use an mp3.
(The API Error 5 doesn't a problem; it just indicates that the track had
never been analyzed before and needs to be uploaded.)
--
You received this message because you are subscribed to the Google Groups "The Echo Nest Remix API" group.
To post to this group, send email to remi...@googlegroups.com.
To unsubscribe from this group, send email to remix-api+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/remix-api?hl=en.
It wasn't the encoding. I fixed the issue be installing the latest echo nest api I guess there was an issue recently with it on windows machines.
The user reported that updating to the latest svn revision of Remix fixed
the bug.
Comment #3 on issue 73 by blac...@echonest.com: API Error 5 every time an
original file is analyzed - analysis is broken
http://code.google.com/p/echo-nest-remix/issues/detail?id=73
(No comment was entered for this change.)