title: Python tkinter passing values to another class (which only seems to accept one value)
body: <p>I am trying to make a tkinter GUI that will scrape certain parts of a website, to make it user-friendly, I made it so that it is in tkinter ans has different frames. the problem is, when switching between frames, I can't seem to pass additional information. This is my code (<a href="https://codeshare.io/aYXv6Y" rel="nofollow noreferrer">https://codeshare.io/aYXv6Y</a>):</p>
  
  <pre><code>import tkinter as tk                # python 3
  from tkinter import font  as tkfont # python 3
  from bs4 import BeautifulSoup
  import requests
  import time
  
  
  class SampleApp(tk.Tk):
  
      def __init__(self, *args, **kwargs):
          tk.Tk.__init__(self, *args, **kwargs)
  
          self.geometry("650x350")
          self.title_font = tkfont.Font(family='Helvetica', size=18, weight="bold", slant="italic")
          self.title_font2 = tkfont.Font(family='Calibri', size=11)
          self.title_fontmainTMenu = tkfont.Font(family='Helvetica', size=16)
          self.title_fontDevices = tkfont.Font(family='Didot', size=13)
          self.title_fontT = tkfont.Font(family='Cambria', size=16)
          self.title("League of Legends Helper")
          changeChampX = 525
          changeChampY = 310
  
          # the container is where we'll stack a bunch of frames
          # on top of each other, then the one we want visible
          # will be raised above the others
          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 (MainMenu, ChampionSelect, ChampionRunes):
              page_name = F.__name__
              frame = F(parent=container, controller=self)
              self.frames[page_name] = frame
  
              # put all of the pages in the same location;
              # the one on the top of the stacking order
              # will be the one that is visible.
              frame.grid(row=0, column=0, sticky="nsew")
  
          self.show_frame("MainMenu")
  
      def show_frame(self, page_name):
          '''Show a frame for the given page name'''
          frame = self.frames[page_name]
          frame.tkraise()
  
      def setChampion(self, championName, championRole):
          self.championName = championName
          self.championRole = championRole
  
  
  class MainMenu(tk.Frame):
  
      def __init__(self, parent, controller):
          tk.Frame.__init__(self, parent)
          self.controller = controller
          label = tk.Label(self, text="Welcome to the Main Menu", font=controller.title_font)
          label.pack(side="top", fill="x", pady=10)
  
          button1 = tk.Button(self, text="Go to Champion Select",
                              command=lambda: controller.show_frame("ChampionSelect"))
          button1.pack()
  
  
  class ChampionSelect(tk.Frame):
  
      def __init__(self, parent, controller):
          tk.Frame.__init__(self, parent)
          self.controller = controller
          label = tk.Label(self, text="Which Champion are you playing?", font=controller.title_fontmainTMenu)
          label.place(x=170, y=70)
  
          nameOfChampionE = tk.Entry(self)
          nameOfChampionE.place(x=170, y=150, width=120, height = 20)
  
          roleOfChampionE = tk.Entry(self)
          roleOfChampionE.place(x=170, y=250, width=120, height=20)
  
          page = requests.get('https://champion.gg/champion/Katarina/Middle?')
          soup = BeautifulSoup(page.text, 'lxml')
  
          championData = soup.find('div', 'summoner-text')
  
  
  
  
          def whichChampion():
              championName = nameOfChampionE.get()
              championRole = roleOfChampionE.get()
              controller.setChampion(championName, championRole)
              command = controller.show_frame("ChampionRunes")
  
          submitName = tk.Button(self, text="Show Champion details",
                                 command=lambda: whichChampion())
          submitName.place(x=170, y=185)
  
  
  
  
  class ChampionRunes(tk.Frame):
  
      def __init__(self, parent, controller):
          tk.Frame.__init__(self, parent)
          self.controller = controller
          label = tk.Label(self, text="", font=controller.title_font)
          label.pack(side="top", fill="x", pady=10)
  
  
  
          button = tk.Button(self, text="Change Champion",
                             command=lambda: controller.show_frame("ChampionSelect"))
          button.place(x=525, y=310)
  
          # URL = f"https://champion.gg/champion/{controller.championName.capitalize()}/{controller.championRole.capitalize()}?"
  
  
          text = controller.ChampionName
          titleChamp = tk.Label(self, text=f"{text}", font=controller.title_fontmainTMenu)
          titleChamp.place(x=170, y=70)
  
  
  
  
  
  
  
  if __name__ == "__main__":
      app = SampleApp()
      app.mainloop()
  </code></pre>
  
  <p>When trying to pass championName and championRole, i get an error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "(FILE PATH)", line 130, in &lt;module&gt;
      app = SampleApp()
    File "(FILE PATH)", line 34, in __init__
      frame = F(parent=container, controller=self)
    File "(FILE PATH)", line 119, in __init__
      text = controller.ChampionName
    File "(FILE PATH)", line 2345, in __getattr__
      return getattr(self.tk, attr)
  AttributeError: '_tkinter.tkapp' object has no attribute 'ChampionName'
  </code></pre>
  
  <p>championName and championRole are  key pieces of information that are part of the URL for the website i am parsing so I really am not sure how else to do this. I am unfamiliar with some parts of the code and am still new to python and tkinter so please try to be as clear as possible.</p>
  
  <p>Any help would be much appreciated. Thanks!</p>