Hi guys am new to python,
pls help trouble shoot this code i get the following error when executing the code in jupiter notebook
pls help trouble shoot this code i get the following error when executing the code in jupiter notebook
Error:--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-23-19227ff4609b> in <module> 8 if len(line.strip()) == 0: 9 continue ---> 10 tweets.append(json.loads(line))['text'] 11 12 with open(labels_filename) as inf: TypeError: 'NoneType' object is not subscriptable# load tweets and labels tweets = [] with open(input_filename)as inf: for line in inf: if len(line.strip()) == 0: continue tweets.append(json.loads(line))['text'] with open(labels_filename) as inf: labels = json.load(inf) tweets = tweets[:len(labels)]
