Why do I get a Key Error while loading my data?

40 Views Asked by At

I'm following this tutorial for LDA and entered the following code

data = load_data("/home/export.json")["texts"]

print (data[0][0:90])

However, i get the following error message:

KeyError                                  Traceback (most recent call last)
<ipython-input-16-0bbfa7176917> in <cell line: 1>()
----> 1 data = load_data("/home/export.json")["texts"]
      2 
      3 print (data[0][0:90])

KeyError: 'texts'

Even though other people always got Key Error messages, no one seemed to have it while loading the data so i couldn't find any previous posts talking about this particular issue.

0

There are 0 best solutions below