I am trying to make a GUI app but have found that the simplest bit of code is giving me a error. I cannot seem to figure out what I am doing wrong.
This is the section of code causing the error:
container = tk.Frame(self)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.frames = {}
for F in (Teams, Final):
frame = F(container)
self.frames[F] = frame
frame.grid(row=0, column=0, sticky="nsew")
self.show_frame(Teams)
Here is the traceback:
Traceback (most recent call last):
File "D:/Files/Code/Python/SPI/Beta/GUI/SPIgui.py", line 47, in <module>
app = SPI()
File "D:/Files/Code/Python/SPI/Beta/GUI/SPIgui.py", line 36, in __init__
frame.grid(row=0, column=0, sticky="nsew")
File "C:\Users\dsull\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 2074, in grid_configure + self._options(cnf, kw))
_tkinter.TclError: cannot use geometry manager grid inside . which already has slaves managed by pack
You can find the full source code for my program here: http://pastebin.com/SD7x0EnE