Skip to content Skip to sidebar Skip to footer

Attribute Error In A Class - Python - On Pycharm

Following is the error pygame 2.0.0 (SDL 2.0.12, python 3.7.7) Traceback (most recent call last): File 'C:/Users/T######/PycharmProjects/pythonProject1/env.py', line 54, in <

Solution 1:

it's __init__ and not __int__. so your code should look like this:

def __init__(self, w=640, h=480):
    ...
    self.score = 0

Post a Comment for "Attribute Error In A Class - Python - On Pycharm"