Problems processing low-activity accounts
Opened this issue · 0 comments
bontchev commented
There is some kind of bug when processing accounts that haven't posted much. The script crashes with the following error:
Traceback (most recent call last):
File "reddit-analyzer.py", line 192, in <module>
timeGraph(timelist)
File "reddit-analyzer.py", line 144, in timeGraph
d.append(tuple([g, tgdata[e][1]]))
IndexError: list index out of range
I've printed the contents of tgdata
before the loop starts and the values of e
as the loop is looping and I got this:
[(2, 1), (3, 1), (4, 5), (6, 1), (7, 2), (9, 1), (10, 1), (18, 2)]
0
1
2
3
4
5
6
7
8
Clearly, the error occurs because the script is trying to get the 9th element of an 8-element array.