Comments (3)
@gbm001 This error does not play on my computer. Give a minimal example that reproduces this problem.
from kivymd.
testapp.py:
(if I don't add the ThemeManager bit it crashes with a different error)
import kivy
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivymd.theming import ThemeManager
class TestAppBase(BoxLayout):
pass
class TestApp(App):
# KivyMD theme
theme_cls = ThemeManager()
def build(self):
self.base = TestAppBase()
return self.base # Root widget
TestApp().run()
testapp.kv:
#:kivy 1.11.0
#:import MDSwitch kivymd.selectioncontrols.MDSwitch
<TestAppBase>:
MDSwitch:
disabled: True
Crashes with:
Traceback (most recent call last):
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 619, in _apply_rule
setattr(widget_set, key, value)
File "kivy/weakproxy.pyx", line 33, in kivy.weakproxy.WeakProxy.__setattr__
File "kivy/properties.pyx", line 483, in kivy.properties.Property.__set__
File "kivy/properties.pyx", line 1468, in kivy.properties.AliasProperty.set
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/widget.py", line 1331, in set_disabled
self.inc_disabled()
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/widget.py", line 1339, in inc_disabled
self.property('disabled').dispatch(self)
File "kivy/properties.pyx", line 1472, in kivy.properties.AliasProperty.dispatch
File "kivy/properties.pyx", line 1474, in kivy.properties.AliasProperty.dispatch
File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
File "kivy/_event.pyx", line 1096, in kivy._event.EventObservers._dispatch
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 73, in call_fn
e_value = eval(value, idmap)
File "<string>", line 55, in <module>
File "kivy/weakproxy.pyx", line 30, in kivy.weakproxy.WeakProxy.__getattr__
AttributeError: 'MDSwitch' object has no attribute 'thumb_color_disabled'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./testapp.py", line 18, in <module>
TestApp().run()
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/app.py", line 800, in run
root = self.build()
File "./testapp.py", line 15, in build
self.base = TestAppBase()
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/boxlayout.py", line 131, in __init__
super(BoxLayout, self).__init__(**kwargs)
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/layout.py", line 76, in __init__
super(Layout, self).__init__(**kwargs)
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/widget.py", line 348, in __init__
Builder.apply(self, ignored_consts=self._kwargs_applied_init)
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 469, in apply
self._apply_rule(widget, rule, rule, ignored_consts=ignored_consts)
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 630, in _apply_rule
e), cause=tb)
kivy.lang.builder.BuilderException: Parser: File "/home/amcleod/android/tests/testapp.kv", line 7:
...
5:<TestAppBase>:
6: MDSwitch:
>> 7: disabled: True
...
AttributeError: 'MDSwitch' object has no attribute 'thumb_color_disabled'
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 619, in _apply_rule
setattr(widget_set, key, value)
File "kivy/weakproxy.pyx", line 33, in kivy.weakproxy.WeakProxy.__setattr__
File "kivy/properties.pyx", line 483, in kivy.properties.Property.__set__
File "kivy/properties.pyx", line 1468, in kivy.properties.AliasProperty.set
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/widget.py", line 1331, in set_disabled
self.inc_disabled()
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/uix/widget.py", line 1339, in inc_disabled
self.property('disabled').dispatch(self)
File "kivy/properties.pyx", line 1472, in kivy.properties.AliasProperty.dispatch
File "kivy/properties.pyx", line 1474, in kivy.properties.AliasProperty.dispatch
File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
File "kivy/_event.pyx", line 1096, in kivy._event.EventObservers._dispatch
File "/home/amcleod/.local/lib/python3.6/site-packages/kivy/lang/builder.py", line 73, in call_fn
e_value = eval(value, idmap)
File "<string>", line 55, in <module>
File "kivy/weakproxy.pyx", line 30, in kivy.weakproxy.WeakProxy.__getattr__
from kivymd.
Fixed for me as well; thanks :)
from kivymd.
Related Issues (20)
- Error importing kivymd.color_definitions when using kivymd_extensions.akivymd HOT 2
- MDDialog hover state change disregards custom md_bg_color HOT 1
- MDTabsSecondary does not allow custom height
- Disabled MDButton fires on_press events if pos_hint defined HOT 1
- ImportError HOT 2
- MDSegmentedButtonItem on_active event not working HOT 1
- Unexpected behaviour of MDSegmentedButton
- MDSwiper not working HOT 1
- MDTabs example is not working HOT 2
- CommonElevationBehavior example code is not working HOT 2
- MDSlider - screen scale support
- MDExpansionPanel without async kivy unexpected behaviour with 100 widgets HOT 4
- Bug with MDCard shadow HOT 1
- MDButton - ImportError HOT 4
- Fix the examples in the documentation for the ToggleButton module
- Positioning of MDTopAppBar elements #2 HOT 3
- MDTopAppBarTitle not work
- datatables in kivymd 2.0.1 dev0 HOT 1
- Transition recovery time HOT 8
- Invalidation of attributes when creating dynamic classes using kvlang in kivymd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kivymd.