Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'tone_categories' #2

Open
cschiri opened this issue Dec 20, 2018 · 0 comments
Open

KeyError: 'tone_categories' #2

cschiri opened this issue Dec 20, 2018 · 0 comments

Comments

@cschiri
Copy link

cschiri commented Dec 20, 2018

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'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant