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

Python

TypeError: __init__() got multiple values for argument 'sides'

Hi, I am following along on Pycharm but when I try to make an instance of D6, I get this error above. Pycharm tells me that "inspection reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments (e.g. duplicate names arguments) and incorrect argument order. I don't see the difference with Kenneth' code. My code is the following:

import random

class Die:
    def __init__(self, sides=2, value=0):
        if not sides >= 2:
            raise ValueError("Must have at least 2 sides")
        if not isinstance(sides, int):
            raise ValueError("Sides must be a whole number")
        self.value = value or random.randint(1, sides)

class D6(Die):
    def __init__(self, value=0):
        super().__init__(self, sides=6, value=value)