KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications. https://youtube.com/c/KivyMD https://twitter.com/KivyMD https://habr.com/ru/users/kivymd https://stackoverflow.com/tags/kivymd
Traceback (most recent call last):
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 245, in create_handler
return eval(value, idmap), bound_list
^^^^^^^^^^^^^^^^^^
File "MDSegmentedButton", line 55, in <module>
AttributeError: 'NoneType' object has no attribute 'parent'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 699, in _apply_rule
value, bound = create_handler(
^^^^^^^^^^^^^^^
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 248, in create_handler
raise BuilderException(rule.ctx, rule.line,
kivy.lang.builder.BuilderException: Parser: File "MDSegmentedButton", line 52:
...
50: pos_hint: {"center_y": .5}
51: padding:
>> 52: "12dp", \
53: 0, \
54: 0 \
...
AttributeError: 'NoneType' object has no attribute 'parent'
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 245, in create_handler
return eval(value, idmap), bound_list
^^^^^^^^^^^^^^^^^^
File "MDSegmentedButton", line 55, in <module>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/work/project/app/segmentbutton.py", line 69, in <module>
Example().run()
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/app.py", line 955, in run
self._run_prepare()
File "~/work/project/.venv/lib/python3.12/site-packages/kivymd/app.py", line 142, in _run_prepare
super()._run_prepare()
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/app.py", line 950, in _run_prepare
self.dispatch('on_start')
File "kivy/_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "~/work/project/app/segmentbutton.py", line 42, in on_start
MDSegmentButtonIcon(icon='cancel'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/work/project/.venv/lib/python3.12/site-packages/kivymd/uix/label/label.py", line 739, in __init__
super().__init__(*args, **kwargs)
File "~/work/project/.venv/lib/python3.12/site-packages/kivymd/uix/behaviors/declarative_behavior.py", line 311, in __init__
super().__init__(**kwargs)
File "~/work/project/.venv/lib/python3.12/site-packages/kivymd/theming.py", line 977, in __init__
super().__init__(**kwargs)
File "~/work/project/.venv/lib/python3.12/site-packages/kivymd/uix/behaviors/backgroundcolor_behavior.py", line 164, in __init__
super().__init__(**kwarg)
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/uix/label.py", line 319, in __init__
super(Label, self).__init__(**kwargs)
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/uix/widget.py", line 366, in __init__
self.apply_class_lang_rules(
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/uix/widget.py", line 470, in apply_class_lang_rules
Builder.apply(
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 545, in apply
self._apply_rule(
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 714, in _apply_rule
raise BuilderException(rule.ctx, rule.line,
kivy.lang.builder.BuilderException: Parser: File "MDSegmentedButton", line 52:
...
50: pos_hint: {"center_y": .5}
51: padding:
>> 52: "12dp", \
53: 0, \
54: 0 \
...
BuilderException: Parser: File "MDSegmentedButton", line 52:
...
50: pos_hint: {"center_y": .5}
51: padding:
>> 52: "12dp", \
53: 0, \
54: 0 \
...
AttributeError: 'NoneType' object has no attribute 'parent'
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 245, in create_handler
return eval(value, idmap), bound_list
^^^^^^^^^^^^^^^^^^
File "MDSegmentedButton", line 55, in <module>
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 699, in _apply_rule
value, bound = create_handler(
^^^^^^^^^^^^^^^
File "~/work/project/.venv/lib/python3.12/site-packages/kivy/lang/builder.py", line 248, in create_handler
raise BuilderException(rule.ctx, rule.line,
Description of the Bug
if you use the MDSegmentedButtonIcon, the application will exit with an AttributeError:
AttributeError: 'NoneType' object has no attribute 'parent'
Code and Logs
Errormessage:
Versions