Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fails when there are no active users to pick #25

Open
slinlee opened this issue Oct 7, 2015 · 1 comment
Open

Script fails when there are no active users to pick #25

slinlee opened this issue Oct 7, 2015 · 1 comment

Comments

@slinlee
Copy link

slinlee commented Oct 7, 2015

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
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants