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 trialDavid Axelrod
36,073 Pointssuper().__init()?
when Kenneth is declaring his resources, he uses super().init() to take care of the reqparsing setup
when i'm running it i get a typeError: super() takes at least 1 arguement not 0. I tried passing in self but i get super takes argument of type , not <myResourceName>
Thanks!
2 Answers
Irvel Nduva
8,977 PointsHello!
I think your problem might be that you're missing the __ of the init:
super().__init__()
Riccardo Candido
Python Web Development Techdegree Student 2,790 Pointssolution: super(CoursesList, self).init() . You have to put these attributes to run the method
David Axelrod
36,073 PointsDavid Axelrod
36,073 PointsAhhh while I typed the question incorrectly, I did have the double dunder in the actual code
It's turns out that since I was using python 2 the syntax was super (<insertclassname>, self).init()
Python3 has abstracted that to just super ().init() ^_^
Hrmm that's weird. On mobile treehouse seems to take away the __'s in my comment