Nov-29-2017, 09:26 PM
Well, the error is appearing because if you're trying to get non-existing lyrics, you get response with another data structure. So it will fail here:
json_obj = json.loads(raw.decode('utf-8')) body = json_obj["message"]["body"]["lyrics"]["lyrics_body"]Try to put there a breaking point and debug it. You'll see it clearly.