There are articles where it raises a 500 error in case it's unable to generate any questions.
For example, for "beer" (I added some lines to print the relevant exception traceback):
Traceback (most recent call last):
File "python/server.py", line 17, in get_quiz
for question in a.quiz.get_ten_random():
File "/Users/svisser/projects/WikiQuiz/python/Quiz.py", line 19, in get_ten_random
selected.append(random.choice(self.questions))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 275, in choice
return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty
IndexError: list index out of range
This may be fixed for free by the change to the sampling logic suggested by #11, specifically by this explicit check for empty sequences before sampling.
There are articles where it raises a 500 error in case it's unable to generate any questions.
For example, for "beer" (I added some lines to print the relevant exception traceback):
This is different from https://github.com/alexgreene/WikiQuiz/issues/1 as I'm able to run the project successfully for other articles (like "baseball").