Script fails when there are no active users to pick
Opened this issue · 1 comments
slinlee commented
At least that's what I'm guessing this means at first glance:
Selecting user at random (queue length was 3)
Traceback (most recent call last):
File "slackbotExercise.py", line 282, in <module>
main()
File "slackbotExercise.py", line 277, in main
assignExercise(bot, exercise)
File "slackbotExercise.py", line 205, in assignExercise
winners = [selectUser(bot, exercise) for i in range(bot.num_people_per_callout)]
File "slackbotExercise.py", line 114, in selectUser
return active_users[random.randrange(0, len(active_users))]
File "/usr/lib/python2.6/random.py", line 204, in randrange
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)
ValueError: empty range for randrange() (0,0, 0)
octosteve commented
👍