[Python] Image not found error when starting a simple kivy app

Discussão em 'Python' iniciado por Stack, Abril 15, 2025.

  1. Stack

    Stack Membro Participativo

    I recently started using kivy and as I gradually learned the language, I wanted to use images. I then tried the following program:

    from kivy.app import App
    from kivy.uix.image import Image

    class ImageTestApp(App):
    def builder(self):
    image_app = Image(source='on.png')
    return image_app

    if __name__ == '__main__':
    ImageTestApp().run()


    The source image on.png is in the same directory as the file containing the code.

    When I run this program, I get the following error :

    [ERROR ] [Image ] Not found <on.png>


    I tried to put the whole path but I still get the same error.

    I can't understand why the image is not found, can you help me?

    Continue reading...

Compartilhe esta Página