Home:ALL Converter>Kivy TypeError unsupported operand type

Kivy TypeError unsupported operand type

Ask Time:2019-10-02T05:23:30         Author:Callum

Json Formatter

I'm getting a TypeError when trying to use operands in my kivy code

 TypeError: unsupported operand type(s) for /: 'ObservableReferenceList' and 'int'

I've read that it's to do with instantiating the NumericProperty class in the python code but I'm not sure what variable I've got to set it to, size?

<DonationType>:
    name: "donation type"
        RoundedButton:
            size_hint: 0.417, 0.15625
            pos_hint: {"x": 0.5282, "y": 0.55}
            Image:
                source: 'House.PNG'
                size: self.parent.size / 2
                pos: self.parent.pos
                stretch: True
                keep_ratio: False

The error is in the self.parent.size / 2 part of the code. The Rounded button is a modified Button.

Author:Callum,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58192426/kivy-typeerror-unsupported-operand-type
yy