Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSimon Amz
4,606 PointsGet an AttributeError when running the program
Hi,
I got this error:
Traceback (most recent call last): File "scoresheets.py", line 57, in <module> YatzyScoresheet().score_one_pair(yh) File "scoresheets.py", line 33, in score_one_pair return self._score_set(hand, 2) File "scoresheets.py", line 27, in _score_set for worth, count in hand._sets.items(): AttributeError: 'YatzyHand' object has no attribute '_sets'
when I run the program. I check with the attachment of the teacher and everything is similar.
I don't know why, they told me no attribute '_sets' whereas it is a property and I did precise @property.
thanks for your help
2 Answers
mhjp
20,372 PointsHi Simon, Please post your code, from all 3 files in the project. That will help us help you.
Simon Amz
4,606 PointsHi Mark,
Thanks for your response, I finally find the solution: simple mistake of indention.
Best,