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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Bas Kuunk](https://uploads.teamtreehouse.com/production/profile-photos/6416442/micro_profielfoto.jpg)
Bas Kuunk
21,308 PointsHow to deal with Python2 and Super()?
So it is a common question. I am on my local machine, a MacBook Air (2011) with python2 pre-installed. Calling super() with no arguments gives me the following error:
TypeError at /teams/edit/1/ super() takes at least 1 argument (0 given)
- One solution I read was to include the class and self as two arguments in super(PageTitleMixin, self). This gives this error:
TypeError at /teams/edit/1/ must be type, not classobj
- Installing python3 should resolve this, but I cannot call manage.py with python 3: ModuleNotFoundError: No module named 'django.core.urlresolvers'
I cannot imagine that I'm the only one with this problem, yet I cannot find an easy solution. Advice is greatly appreciated. Thanks!
2 Answers
![Alexander Davison](https://uploads.teamtreehouse.com/production/profile-photos/4157542/micro_binary.jpg)
Alexander Davison
65,469 PointsPython 2 is different from Python 3—the version Treehouse teaches—and many of Python 2's features are differently used than in Python 3. I recommend installing Python 3 on your computer.
I hope this helps!
Happy coding! ~Alex
![barbarak](https://uploads.teamtreehouse.com/production/profile-photos/9913862/micro_a076aa2337c02050470f5c266132629b.jpg)
barbarak
36,789 PointsThis seems to work for me:
class PageTitleMixin(object):
page_title = ""
def get_page_title(self):
return self.page_title
def get_context_data(self, **kwargs):
context = super(PageTitleMixin, self).get_context_data(**kwargs)
context["page_title"] = self.get_page_title()
return context