Hello, I am having the same problem with the track.upload(file, true). Did you find a solution?
Error message:
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.sendCommandRaw(Commander.java:305)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.getStringResults(Commander.java:190)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.getMapResults(Commander.java:175)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.getCheckedResults(Commander.java:155)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.sendCommand(Commander.java:101)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.sendCommand(Commander.java:78)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.util.Commander.sendCommand(Commander.java:72)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.ENItem.getItemMap(ENItem.java:231)
05-15 00:20:25.714: E/AndroidRuntime(2046): at com.echonest.api.v4.ENItem.
code:
print("File currFile = new File(file.getPath());
if(!currFile.exists()) {
System.err.println("Can't fine " + file.getPath());
}
else {
System.out.println("found file " + file.getPath());
Track track = en.uploadTrack(currFile, false); //line where throws error
track.waitForAnalysis(30000);
if (track.getStatus() == Track.AnalysisStatus.COMPLETE) {
System.out.println("Tempo: " + track.getTempo());
System.out.println("Loudness: " + track.getLoudness());
System.out.println();
System.out.println("Beat start times:");
TrackAnalysis analysis = track.getAnalysis();
for (TimedEvent beat : analysis.getBeats()) {
System.out.println("beat " + beat.getStart());
}
} else {
System.err.println("Trouble analysing track " + track.getStatus());
}
}");");