title: "NoneType" AttributeError in Kivy
body: <p>Error That my code is producing
  <a href="https://i.stack.imgur.com/F53HU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F53HU.jpg" alt="error" /></a>
  I'm trying to build a screen which would use camera in most of the part and labels in the other. I'm using Camera widget inside a FloatLayout. But the Camera isn't working and is throwing a NoneType error. I've just included the main part of the code and what's really causing the error.
  I tried reading the documentation and also researched about some external libraries that i thought i might not be importing by mistake but no luck there. Any help?
  Thanks.</p>
  <pre><code>from kivymd.app import MDApp
  from kivy.lang.builder import Builder
  from kivy.uix.screenmanager import ScreenManager, Screen
  from kivymd.uix.boxlayout import BoxLayout
  from kivy.properties import ObjectProperty
  screen_helper = &quot;&quot;&quot;
  &lt;HomeScreen&gt;:
      name: &quot;home&quot;
      MDToolbar:
          pos_hint: {&quot;top&quot;: 1}
          elevation: 10
          title: &quot;Demo&quot;
          left_action_items: [[&quot;menu&quot;, lambda x: root.nav_drawer.set_state(&quot;open&quot;)]]
          right_action_items: [[&quot;face&quot;, lambda x: app.ShowProfile()]]
      FloatLayout:
          Camera:
              resolution: (100,120)
              size: self.size
              allow_stretch: True
      GridLayout:
          cols: 2
          MDLabel:
              text: 'item1:'
          MDLabel:
              text: 'item2:'
          MDLabel:
              text: 'item3'
          MDLabel:
              text: 'item4'
          MDRaisedButton:
              text: 'Start Scanning'
              on_release:
                  app.ShowCamera()
  
  class HomeScreen(Screen):
      pass
  
  sm = ScreenManager()
  sm.add_widget(HomeScreen(name='home'))
  
  &quot;&quot;&quot;
  
  
  class DemoApp(MDApp):
  
      def build(self):
          screen = Builder.load_string(screen_helper)
          return screen
       def ShowProfile(self):
          self.root.ids.screen_manager.current = 'profile'
  
      def ShowHome(self):
          self.root.ids.screen_manager.current = 'home'
  
      def ShowCamera(self):
          self.root.ids.screen_manager.current = 'camera'
  
  DemoApp().run()
  </code></pre>