Skip to content

KeyError: 'tone_categories' #2

@cschiri

Description

@cschiri

Hi Sahir,

When I execute the bunch of code below I get "KeyError: 'tone_categories'". Can you please advise on how I can fix it:

#Traverse the heirarchy of result
for i in json_output.result['document_tone']['tone_categories']:
for j in i['tones']:
#Append the attributes to the data
data.set_value(index.result, j['tone_name'], j['score'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions