title: Python Tkinter TypeError: 'int' object is not callable
body: <p>I am trying to take user input from main.py and then use that information to produce an output on runAnalytics. The problem that I am running into is that sometimes, the user input will produce a value of None (maybe null, I don't know) when the dividen_yield is not available and then my whole program will stop. It works flawlessly when there is a dividend-yield though.</p>
  
  <p>main.py</p>
  
  <pre><code>import runAnalytics
  from tkinter import *
  import os
  import centerWindow
  
  loadApplication = Tk()
  loadApplication.title("Stock Analytics")
  loadApplication.geometry("1080x720")
  
  label1 = Label(loadApplication, text = "Ticker")
  input1 = Entry(loadApplication)
  
  loadAnalytics = Button(loadApplication, text = "Load Analytics", command=lambda: runAnalytics.run(input1))
  
  centerWindow.center(loadApplication)
  
  
  label1.pack()
  input1.pack()
  loadAnalytics.pack()
  
  loadApplication.mainloop()
  </code></pre>
  
  <p>runAnalytics.py</p>
  
  <pre><code>from yahoo_finance import Share
  from tkinter import *
  import os
  import centerWindow
  
  def run(input1):
      ticker = Share(input1.get())
      loadAnalytics = Tk()
      loadAnalytics.title("$" + "ticker" +  "Data")
      loadAnalytics.geometry("1080x720")
      centerWindow.center(loadAnalytics)
  
      ticker.refresh()
  
      if ticker.get_dividend_yield() is None:
          ticker.get_dividend_yield == 0
  
      share_price    = Label(loadAnalytics, text = "Share Price: " + ticker.get_price()).pack()
      prev_open      = Label(loadAnalytics, text = "Previous Open: " + ticker.get_open()).pack()
      prev_close     = Label(loadAnalytics, text = "Previous CLose: " + ticker.get_prev_close()).pack()
      dividend_yield = Label(loadAnalytics, text = "Dividend Yield: " + ticker.get_dividend_yield()).pack()
      year_low       = Label(loadAnalytics, text = "52 Week Low: " + ticker.get_year_low()).pack()
      year_high      = Label(loadAnalytics, text = "52 Week High: " + ticker.get_year_high()).pack()
      volume         = Label(loadAnalytics, text = "Volume: " + ticker.get_volume()).pack()
  
      loadAnalytics.mainloop()
  </code></pre>
  
  <p>[Error] </p>
  
  <blockquote>
    <p>Exception in Tkinter callback
            Traceback (most recent call last):
              File "C:\Users\MyName\AppData\Local\Programs\Python\Python35-32\lib\tkinter__init__.py", line 1550, in <strong>call</strong>
                return self.func(*args)
              File "C:\Users\MyName\Documents\Python Projects\DataAnalytics\main.py", line 13, in 
                loadAnalytics = Button(loadApplication, text = "Load Analytics", command=lambda: runAnalytics.run(input1))
              File "C:\Users\MyName\Documents\Python Projects\DataAnalytics\runAnalytics.py", line 21, in run
                dividend_yield = Label(loadAnalytics, text = "Dividend Yield: " + ticker.get_dividend_yield()).pack()
            TypeError: 'int' object is not callable</p>
  </blockquote>