below is my code for my final project. I am getting an error that says AttributeError: 'NoneType' object has no attribute 'draw'. I was wondering if anyone knows how to fix this
class Rectangles:
#9 different squares will appear with the values 1-9
def __init__(self, point1, point2, point3, point4):
self.rectangle = Rectangle(Point(point1, point2), Point(point3, point4))
self.rectangle.setFill("brown")
def draw(self, win):
self.rectangle.draw(win)
def setupRectangle():
rect1 = Rectangles(0,900,100,400)
def main():
win = GraphWin("Shut The Box",WINDOW_WIDTH, WINDOW_HEIGHT)
win.setBackground("green")
rect = setupRectangle()
rect.draw(win)
#rect.draw(win)
if __name__ == '__main__':
main()