I tried the KivyMD Chip, however, the following error was appear as follow:
from kivy.lang import Builder
from kivymd.app import MDApp
class MyApp(MDApp):
def build(self):
return Builder.load_string(KV)
KV = '''
MDBoxLayout:
pos_hint: {'center_y': 1, 'center_x':1}
MDChip:
text: 'Google'
icon: 'Google'
check: True
'''
MyApp().run()
Error
Traceback (most recent call last):
File "c:\Users\Kelvin Loh\Documents\kivyMD\chip_1.py", line 18, in <module>
MyApp().run()
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\app.py", line 949, in run
self._run_prepare()
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\app.py", line 919, in _run_prepare
root = self.build()
File "c:\Users\Kelvin Loh\Documents\kivyMD\chip_1.py", line 6, in build
return Builder.load_string(KV)
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\lang\builder.py", line 408, in load_string
self._apply_rule(
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\lang\builder.py", line 661, in _apply_rule
child.apply_class_lang_rules(
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\uix\widget.py", line 463, in apply_class_lang_rules
Builder.apply(
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\lang\builder.py", line 541, in apply
self._apply_rule(
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\lang\builder.py", line 663, in _apply_rule
self._apply_rule(
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\lang\builder.py", line 660, in _apply_rule
widget.add_widget(child)
File "C:\Users\Kelvin Loh\Documents\kivyMD\kivy_venv\lib\site-packages\kivy\uix\floatlayout.py", line 135, in add_widget
widget.bind(
File "kivy\_event.pyx", line 429, in kivy._event.EventDispatcher.bind
KeyError: 'pos_hint'