Hi, frequently I redirect reports to text files on my debians & OSXs, to keep trace about ongoing Twarcs. But in the first IF...THEN...ELSE 4 lines lack of .encode("utf-8") when calling sparkline.sparkify() to print percentiles.
Adding .encode("utf-8"), like you do in all other calls, at lines 25-29-33-37 solve the following errors:
reportprofile.py tweets.json > reporttweets.txt
Traceback (most recent call last):
File "../twarc-report/reportprofile.py", line 25, in <module>
print "User percentiles: " + sparkline.sparkify(data["userspercentiles"])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-27: ordinal not in range(128)
Sorry if I'm not doing a pull/request, but I'm not sure it happens to all users.
Hi, frequently I redirect reports to text files on my debians & OSXs, to keep trace about ongoing Twarcs. But in the first IF...THEN...ELSE 4 lines lack of .encode("utf-8") when calling sparkline.sparkify() to print percentiles. Adding .encode("utf-8"), like you do in all other calls, at lines 25-29-33-37 solve the following errors:
Sorry if I'm not doing a pull/request, but I'm not sure it happens to all users.