Jun-06-2017, 04:13 PM
(Jun-06-2017, 02:08 PM)milll929 Wrote: points = next_line(the_file)
return category, question, answers, correct, explanation, int(points)
You're reading lines from a file, and converting those lines to an int. Based on the error, it looks like one of the lines is blank.
>>> int("5") 5 >>> int("") Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: ''So either get rid of the blank line, or test to see if the line actually has contents before trying to cast it to an int, or use try/except to handle the error.