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 Starting Pymodoro

Nope... This code isn't working

I'm copying the code exactly and it's not working, basically it stops working when I add the line:

self.mainframe.pack(fill=tkinter.BOTH, expand=True)

Here is my complete code:

import tkinter

class Pymodoro:
    def __init__(self, master):
        self.master = master
        self.mainframe = tkinter.Frame(self.master, bg='white')
        self.mainframe.pack(fill=tkinter.BOTH, expand=True)

if __name__ == '__main__':
    root = tkinter.Tk()
    Pymodoro(root)
    root.mainloop()

1 Answer

Maurice Abney
PLUS
Maurice Abney
Courses Plus Student 9,859 Points

Check the indentation, I had the same problem until i realized i didnt indent def build_banner. This is for anyone who has issues with this section in general