title: Kivy: Invalid instance in App.root
body: <p>I am new to Python as well as Kivy, this is my first small project, and don't know what I did wrong, following is the log from pydev(eclipse):</p>
  
  <pre><code>[INFO              ] Kivy v1.8.0
  [INFO              ] [Logger      ] Record log in C:\Users\Sudheer\.kivy\logs\kivy_14-06-21_10.txt
  [INFO              ] [Factory     ] 157 symbols loaded
  [DEBUG             ] [Cache       ] register &lt;kv.lang&gt; with limit=None, timeout=Nones
  [DEBUG             ] [Cache       ] register &lt;kv.image&gt; with limit=None, timeout=60s
  [DEBUG             ] [Cache       ] register &lt;kv.atlas&gt; with limit=None, timeout=Nones
  [INFO              ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
  [DEBUG             ] [Cache       ] register &lt;kv.texture&gt; with limit=1000, timeout=60s
  [DEBUG             ] [Cache       ] register &lt;kv.shader&gt; with limit=1000, timeout=3600s
  [INFO              ] [Text        ] Provider: pygame
  [DEBUG             ] [Cache       ] register &lt;kv.loader&gt; with limit=500, timeout=60s
  [INFO              ] [Loader      ] using a thread pool of 2 workers
  [DEBUG             ] [Cache       ] register &lt;textinput.label&gt; with limit=None, timeout=60.0s
  [DEBUG             ] [Cache       ] register &lt;textinput.width&gt; with limit=None, timeout=60.0s
  [DEBUG             ] [App         ] Loading kv &lt;D:\OS Files\workspace\Kal\Src\myclass.kv&gt;
  [DEBUG             ] [App         ] kv &lt;D:\OS Files\workspace\Kal\Src\myclass.kv&gt; not found
  [CRITICAL          ] App.root must be an _instance_ of Widget
   Traceback (most recent call last):
     File "D:\OS Files\workspace\Kal\__main__.py", line 9, in &lt;module&gt;
       MyClass().run()    
     File "C:\Kivy180\kivy\kivy\app.py", line 772, in run
       raise Exception('Invalid instance in App.root')
   Exception: Invalid instance in App.root
  </code></pre>
  
  <p>Code file structure is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/yOUG1.png" alt="File Structure Under Pydev"></p>
  
  <p>Codes are as follows:
  File:<strong>main</strong>.py</p>
  
  <pre><code>from Src.AppStart import MyClass
  
  if __name__ == '__main__':
      MyClass().run()    
  </code></pre>
  
  <p>File:AppStart.py:</p>
  
  <pre><code>from kivy.app import App
  from Src.Logins.LoginForm import LoginForm
  from kivy.uix.button import Button
  
  class MyClass(App):
      '''
      classdocs
      '''
      def build(self):
          c=LoginForm
          #c=Button(text="Checked")
          return c
  </code></pre>
  
  <p>File:LoginForm.py:</p>
  
  <pre><code>from kivy.uix.gridlayout import GridLayout
  from kivy.graphics import Color
  from kivy.uix.label import Label
  from kivy.uix.textinput import TextInput
  
  class LoginForm(GridLayout):
      '''
      classdocs
      '''
      def __init__(self, **kwargs):
          #kwargs['cols'] = 1
  
          #Layout=GridLayout(cols=2, rows=3, background_color=Color(1,1,1))
          self.cols=2
          self.rows=3
          self.background_color=Color(1,1,1)
  
          IDlbl =Label(text="User ID: ")
          PWlbl =Label(text="Password: ")
          IDtxtbox = TextInput(text="",multiline=False)
          PWtxtbox = TextInput(text="",multiline=False, password=True)
  
          self.add_widget(IDlbl)
          self.add_widget(PWlbl)
          self.add_widget(IDtxtbox)
          self.add_widget(PWtxtbox)
          #return Layout
          super(LoginForm, self).__init__(**kwargs)
  </code></pre>
  
  <p>Could you please let me know why is App.root is an invalid instance, </p>