title: Getting " TypeError: 'NoneType' object is not subscriptable" error
body: <p>I have the following Python code and Kivy configuration file, taken directly from a tutorial:</p>
  <pre><code>import kivy
  from kivy.app import App
  from kivy.uix.widget import Widget
  from kivy.properties import ObjectProperty
  from kivy.lang import Builder
  from kivy.core.window import Window
  
  Builder.load_file('float_layout.kv')
  
  class MyLayout(Widget):
      pass
  
  class AwesomeApp(App):
      def build(self):
          Window.clearcolor = (1,1,1,1)
          return MyLayout()
  
  if __name__ == '__main__':
      AwesomeApp().run()
  </code></pre>
  <pre><code>&lt;Button&gt;
      font_size: 32
      size_hint: (0.3, 0.3)
  
  &lt;MyLayout&gt;
  
      FloatLayout:
          size: root.width, root.height
  
              Button:
                  text: &quot;q1&quot;
  
              Button:
                  text: &quot;q2&quot;
  
              Button:
                  text: &quot;C&quot;
  
              Button:
                  text: &quot;q3&quot;
  
              Button:
                  text: &quot;q4&quot;
  </code></pre>
  <p>I get the following error message:</p>
  <pre><code>[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
   Traceback (most recent call last):
     File &quot;/Users/JIM/PycharmProjects/test_float/main.py&quot;, line 8, in &lt;module&gt;
       Builder.load_file('float_layout.kv')
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/builder.py&quot;, line 306, in load_file
       return self.load_string(data, **kwargs)
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/builder.py&quot;, line 373, in load_string
       parser = Parser(content=string, filename=fn)
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/parser.py&quot;, line 402, in __init__
       self.parse(content)
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/parser.py&quot;, line 511, in parse
       objects, remaining_lines = self.parse_level(0, lines)
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/parser.py&quot;, line 614, in parse_level
       _objects, _lines = self.parse_level(
     File &quot;/Users/JIM/PycharmProjects/test_float/venv/lib/python3.9/site-packages/kivy/lang/parser.py&quot;, line 674, in parse_level
       if current_property[:3] == 'on_':
   TypeError: 'NoneType' object is not subscriptable
  </code></pre>
  <p>What is wrong?</p>