First post! I need help with freecodecamp quiz app

I am just learning to code, and maybe this project was a bit too much at once, but I think I did everything right. I was trying to make the quiz game with ui Quiz Game with UI but when I try to run the file I get the error:

File “C:\Users\loomi\Python Stuff\Scratch\Projects\Quiz_Game\”, line 32, in init
File “C:\Users\loomi\Python Stuff\Scratch\Projects\Quiz_Game\”, line 88, in display_options
for option in self.quiz.current_question.choices:
AttributeError: ‘Question’ object has no attribute ‘choices’

And the .choices is grey in my VSC window. The only “choices” attribute I can find in all the code is in the code. In the code the .buttons() in self.buttons() is also greyed out. I checked the code posted in the github and it looks the same so I don’t know where the issue is, although I can’t say I really understand everything that’s going on with all these intersecting parts. I could certainly use some help.

I haven’t changed anything, but now I am getting this error:

Traceback (most recent call last):
File “c:\Users\loomi\Python Stuff\Scratch\Projects\Quiz Game\”, line 1, in
class QuizInterface:
File “c:\Users\loomi\Python Stuff\Scratch\Projects\Quiz Game\”, line 2, in QuizInterface
def init(self, quiz_brain: QuizBrain) → None:
NameError: name ‘QuizBrain’ is not defined

“from quiz_brain import Quizbrain” is the second line of the code, so I don’t know why it isn’t being defined.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.