Hi
I'm learning python a few weeks and have problems with code that read text
from txt-file
Code doing all right, but in the end I have error

Traceback (most recent call last):
  File "trivia_challenge.py", line 81, in <module>
    main()
  File "trivia_challenge.py", line 74, in main
    category, question, answers, correct, explanation, points =
next_block(trivia_file)
  File "trivia_challenge.py", line 37, in next_block
    points = int(next_line(the_file))
ValueError: invalid literal for int() with base 10: ''

I see it don't like empty line, but line is not emty...

py-file http://pastebin.com/9C4guZq5

txt-file http://pastebin.com/dZVs8V9P
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to