-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot convert kivy.properties.BoundedNumericPropertyStorage to kivy.properties.NumericPropertyStorage #7398
Comments
Hi, I was checking the change history and this problem appears in this commit dbd9aec |
I believe #7424 should fix it. Can you check? |
Hello, I checked and the error still persists and apparently it is due to the implementation of kivymd == 0.104.2.dev0 I put the code with which the revision is made, otherwise MDFlatButton works correctly
|
I just tried the code above with kivy master and kivymd master and could not trigger the issue. Do you have to do something to trigger the issue? |
you're right @matham, try following these steps: install kivy: install kivymd: The previous code worked, but I managed to replicate the failure by modifying the code like this:
|
Yeah. I was managed to debug the application and found out that the reason for the error is the size_hint of widgets like the button. You can not set |
I have refactored some pieces of my code to avoid this exception so it does not appear. |
Ok, I was able to reproduce it. This is actually a bug in KivyMD, which just wasn't visible before, but now it is because of the linked changes. In widget.py Widget we have: width = NumericProperty(100)
height = NumericProperty(100)
size = ReferenceListProperty(width, height) Then in KivyMD in class BaseRectangularButton(...):
width = BoundedNumericProperty(
88, min=88, max=None, errorhandler=lambda x: 88
) But, the
In the second before last line, it's actually using Previously this would cause an explicit exception because The solution is for KivyMD to do: class BaseRectangularButton(...):
width = BoundedNumericProperty(
88, min=88, max=None, errorhandler=lambda x: 88
)
height = NumericProperty(100)
size = ReferenceListProperty(width, height) However, this leads to So ultimately I think this is something KivyMD needs to fix so I'll close it. |
Software Versions
Describe the bug
I have been compiled my application with WSL many times before, but the last one went wrong.
I have debugged the application on my mobile device through the ADB and got such traceback.
What the reason could it be and how can I fix it?
Expected behaviour
Expect application to run properly.
To Reproduce
Here is a branch from which I built https://github.com/hladkky/alias-kivy-application/tree/temp.
Code and Logs and screenshots
The text was updated successfully, but these errors were encountered: