Error loading GIF file in KivyMD

178 views
Skip to first unread message

Lizzie Faye

unread,
Feb 22, 2023, 12:42:40 PM2/22/23
to Kivy users support
Hi,
I've been trying to create a simple splash screen with a gif in it. However when i run my file it doesn't seem to work and it can't load the gif even though the file size is very low. I also get this error:

[ERROR  ] [Image       ] Error loading <assets/finalsagipin.gif>
 Traceback (most recent call last):
   File "kivy\properties.pyx", line 961, in kivy.properties.ObservableDict.__getattr__
 KeyError: 'progress'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "c:\Users\Natsukichi\Documents\SACLOLO\app.py", line 52, in <module>
   File "kivy\properties.pyx", line 964, in kivy.properties.ObservableDict.__getattr__
 AttributeError: 'super' object has no attribute '__getattr__'. Did you mean: '__setattr__'?


Any kind of help would be appreciated! Thanks!

Elliot Garbus

unread,
Feb 22, 2023, 1:14:08 PM2/22/23
to kivy-...@googlegroups.com

Please share a minimal executable program.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f8323e86-e3bf-48d4-b75e-2490ce79d5f0n%40googlegroups.com.

 

Lizzie Faye

unread,
Feb 22, 2023, 7:54:33 PM2/22/23
to kivy-...@googlegroups.com
this is a snippet of my code in main.py

from kivy.clock import Clock
from kivy.core.window import Window
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager
from kivymd.app import MDApp

Window.size = (310, 580)


class Test(MDApp):
    global screen_manager
    screen_manager = ScreenManager()
    def build(self):
        # self.title = "SACLOLO"
        # self.theme_cls.primary_palette = "BlueGray"
        
        screen_manager.add_widget(Builder.load_file("splashscreen.kv"))
        screen_manager.add_widget(Builder.load_file("main.kv"))
        
        return screen_manager

    def on_start(self):
        Clock.schedule_once(self.change_screen, 10)

    def change_screen(self, dt):
        screen_manager.current = "splashscreen"

if __name__ == "__main__":
    Test().run()

and this one is in my splashscreen.kv

MDScreen:
    name: "splashscreen"
    on_enter: self.ids.progress.start()

    FloatLayout:
        Image:
            source: "assets/finalsagipin.gif"
            allow_stretch: True
            anim_delay: 0
            anim_reset: True

Elliot Garbus

unread,
Feb 22, 2023, 8:11:57 PM2/22/23
to kivy-...@googlegroups.com

There is not enough code for me to really help… but

 

MDScreen:

    name: "splashscreen"

    on_enter: self.ids.progress.start()

 

In kv code, assuming the progress id is in the same name space, you would just say progress.start()

 

If this doesn’t solve your issue, please post a minimal, runnable program.

--

You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages