Quantcast
Channel: The Echo Nest Developer Forum
Viewing all articles
Browse latest Browse all 1582

Track.get_analysis() failure

$
0
0

So that old TRID from the example is no longer valid. You'll need to obtain a current TRID via API calls. Try this:

from pyechonest import config, song, track
config.ECHO_NEST_API_KEY = 'APIKEY'
songs = song.search(style='rock', max_tempo=150, min_tempo=30, results=100)
tracks = songs[0].get_tracks('spotify-WW')
t = track.track_from_id(tracks[0]['id'])
t.get_analysis()
print t.artist, '-', t.title, t.energy

This demonstrates the use of t.get_analysis().


Viewing all articles
Browse latest Browse all 1582

Trending Articles