I have been trying to run a code .But i have been getting this error

Traceback (most recent call last):
File "notebook.py", line 126, in <module>
Testbook()
File "notebook.py", line 90, in init
bufferf = "%s %d credits %s Difficulty" % (question.question_id, question.credits, question.difficulty)
AttributeError: 'ShortAnswerQuestion' object has no attribute 'question_id'

I made the following changes

test=Textbook()

but still the probelm I get the same error.Even after going through the documentation the problem isn't solved.I have attached the files as well
src.zip

There is no way to tell without code and a complete message but "AttributeError: 'ShortAnswerQuestion' object has no attribute 'question_id' " usually applies to a class (don't know if you use one or not). So instead of declaring a variable as self.question_id, it is defined as question_id and so is not a member of the class but is a member of the function that declares the variable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.