Closed knilssen closed 7 years ago
Temporarily fixed by just testing for the u'\2014'.
if item[0] == u'\u2014': firstItem = (item[0]).strip(")('?.,:
")
else:
firstItem = (str(item[0])).strip(")('?.,:")
If this is the only error we come across, perfect. This will need something else to check for.
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in position 0: ordinal not in range(128)
Error in personOfInterestWeightWithInputs.py at line 60
firstItem = (str(item[0])).strip(")('?.,:
")This is the first time I have encountered this error. It has only happened with this article and keyword. This error occurs with the parameters: python personOfInterestWeightWithInputs.py 'http://www.cnn.com/2017/02/04/politics/us-protests-trump/index.html' "Donald J. Trump"