79091807

Date: 2024-10-15 21:31:55
Score: 1
Natty:
Report link

For me the issue came from the fact that I was accidentally loading the .kv file twice, as explained here: https://stackoverflow.com/a/62760571/27820962

Once explicitly in the build method and again because kivy automatically loads .kv files with the same name as the class (without the 'App' suffix).

class MyApp(MDApp):
    def build(self):
        return Builder.load_file("my.kv") 

And since I defined the CustomOneLineIconListItem widget in the kv file, it was being declared twice, as bubonic said before.

The fix was to skip the manual load by removing the build method entirely.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Elyece Malnati