how can i solve the problem of 'NoneType' object is not callable when using xcamera in python 3.9.0

Viewed 79

I'm a beginner in kivy and i want to create a basic kivy camera app that takes pictures

from kivy.app import App
from kivy.lang.builder import Builder
from kivy_garden.xcamera 

When i try running my code i get this error

File "C:\Users\SAMSUNG\PycharmProjects\ediprojects\venv\lib\site-packages\kivy_garden\xcamera\xcamera.py", line 85, in _on_index
     self._on_index_dispatch(*largs)
File "C:\Users\SAMSUNG\PycharmProjects\ediprojects\venv\lib\site-packages\kivy_garden\xcamera\xcamera.py", line 88, in _on_index_dispatch
File "C:\Users\SAMSUNG\PycharmProjects\ediprojects\venv\lib\site-packages\kivy\uix\camera.py", line 101, in _on_index
     self._camera = CoreCamera(index=self.index, stopped=True)
    TypeError: 'NoneType' object is not callable

Here is my kivy file

    FloatLayout:
    orientation:"vertical"
    XCamera:
        id:xCamera

    Button:
        text:"Change camera"
        size_hint:.2,.1
        pos_hint:{"center_x": .5}

I installed xcamera using the command garden install xcamera i also installed opencv-python

I'm using python 3.9.0 kivy-garden 0.1.4 kivy 2.0.0 And i use a windows 10 64 bits machine

0 Answers
Related