That is not the real error. That is the error you will see when you press reload in your browser when the URL is .../processattempt.php. Don't do that!
Go back to the course page, go into the quiz, and click 'Continue attempt'. That might then give us a relevant error message.