title: UnboundLocalError: local variable 'islenen_hesap_sayisi' referenced before assignment
body: <pre><code>class botucalistirclass(QtCore.QObject):
  
  
      redmessage = QtCore.pyqtSignal(str)
      greenmessage = QtCore.pyqtSignal(str)
      yellowmessage = QtCore.pyqtSignal(str)
  
      def bot(self):
          
          mode = &quot;PC&quot;
          if mode==&quot;PC&quot;:
              while islenen_hesap_sayisi&lt;hesapsayisi:
                  islenen_hesap_sayisi += 1
                  #Selenium codes
  
          elif mode==&quot;VDS&quot;:
              #Selenium codes
  
              self.yellowmessage.emit(&quot;Program 24 saatlik bekleme süresine girdi.&quot;)
  
              time.sleep(86460)
  
  
  
  
  
  class MainPage(QMainWindow):
  
          def __init__(self, *args, **kwargs):
              QtWidgets.QWidget.__init__(self, *args, **kwargs)
              loadUi(&quot;agb.ui&quot;, self)
              
  
              islenen_hesap_sayisi = 0
  
              hesap_sayisi = 10
  </code></pre>
  <p>hesap_sayisi is variable, just for example 10.
  When start other class, i getting error. Error is &quot;UnboundLocalError: local variable 'islenen_hesap_sayisi' referenced before assignment&quot;.
  I want one variable use two class. How can do this?</p>