New to Kivy - Lots of Error Messages

289 views
Skip to first unread message

Michelle Kaiser

unread,
Jul 15, 2017, 6:26:22 PM7/15/17
to Kivy users support
Hey,

    I'm following a youtube tutorial, but I am getting a boatload of errors on my first project.  I'm almost wondering if I have a dependency problem or something.  Has anyone seen the following error set before?  Thanks.

C:\Users\Michelle Kaiser\Desktop\Automate the Boring Stuff>python main.py
[INFO   ] [Logger      ] Record log in C:\Users\Michelle Kaiser\.kivy\logs\kivy_17-07-15_9.txt
[INFO   ] [Kivy        ] v1.10.0
[INFO   ] [Python      ] v3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]
[INFO   ] [Factory     ] 194 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO   ] [OSC         ] using <thread> for socket
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.4.0 - Build 21.20.16.4550'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) HD Graphics 530'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 4
[INFO   ] [GL          ] Shading version <b'4.40 - Build 21.20.16.4550'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Shader      ] fragment shader: <b"WARNING: 0:7: '' :  #version directive missing">
[INFO   ] [Shader      ] vertex shader: <b"WARNING: 0:7: '' :  #version directive missing">
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Base        ] Start application main loop
[INFO   ] [Base        ] Leaving application in progress...
 Traceback (most recent call last):
   File "main.py", line 14, in <module>
     CoinTossApp().run()
   File "C:\Python\Python36-32\lib\site-packages\kivy\app.py", line 828, in run
     runTouchApp()
   File "C:\Python\Python36-32\lib\site-packages\kivy\base.py", line 504, in runTouchApp
     EventLoop.window.mainloop()
   File "C:\Python\Python36-32\lib\site-packages\kivy\core\window\window_sdl2.py", line 663, in mainloop
     self._mainloop()
   File "C:\Python\Python36-32\lib\site-packages\kivy\core\window\window_sdl2.py", line 405, in _mainloop
     EventLoop.idle()
   File "C:\Python\Python36-32\lib\site-packages\kivy\base.py", line 339, in idle
     Clock.tick()
   File "C:\Python\Python36-32\lib\site-packages\kivy\clock.py", line 553, in tick
     current = self.idle()
   File "C:\Python\Python36-32\lib\site-packages\kivy\clock.py", line 533, in idle
     usleep(1000000 * sleeptime)
   File "C:\Python\Python36-32\lib\site-packages\kivy\clock.py", line 717, in usleep
     _usleep(microseconds, self._sleep_obj)
   File "C:\Python\Python36-32\lib\site-packages\kivy\clock.py", line 395, in _usleep
     _kernel32.WaitForSingleObject(obj, 0xffffffff)
 KeyboardInterrupt

ZenCODE

unread,
Jul 15, 2017, 7:38:40 PM7/15/17
to Kivy users support
Looks like a problem in the app. Please post the code you are trying to run, or a minimal example that demonstrates the issue.

Thanks

Bill Janssen

unread,
Jul 16, 2017, 1:31:31 PM7/16/17
to Kivy users support
There are no errors shown in this log.  ??  Perhaps you posted the wrong log?

Bill

Michelle Kaiser

unread,
Jul 17, 2017, 1:22:36 PM7/17/17
to Kivy users support
EDIT
I'm trying to run the code from the Amanda Hogan tutorial.  So, I'll list how I named each file and then the file contents.
main.py

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout

class CoinTossBoxLayout(BoxLayout):
    def choice(self, guess):
        output="You clicke the "+guess+" button!"
        self.ids.result.text=output

class CoinTossApp(App):
    def build(self):
        return CoinTossBoxLayout()

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

kivy_tut3.kv

<CoinTossBoxLayout>:
    orientation: 'vertical'
    Label:
        text: 'Welcome to Heads or Tails!'
        font_size: 50
    BoxLayout:
        orientation: 'horizontal'
        Button:
            text: 'Heads'
            on_release: root.choice('heads')
        Button:
            text: 'Tails'
            on_release: root.choice('tails')
        Label:
            id: result
            font_size: 40
            text:''


I've emailed Ms. Hogan to asked if I'm missing something important about writing a program with two files.  She told me to name the first file main.py and didn't have a lot to say about naming the second one.  If you look at her tutorial "Kivy Basics" I am at 16:43.  And I'm really just copying everything (because it's a tutorial).  So, I'm at a loss for what could be wrong.  Thanks! 

Bill Janssen

unread,
Jul 17, 2017, 9:20:07 PM7/17/17
to Kivy users support
I think the kv file has to be called cointoss.kv -- otherwise the app code won't know to load it.  The app code takes its own name, trims off a trailing "App" if present, lowercases the result, and then looks for a .kv file with that name.  If you don't name it cointoss.kv, then you have to add code to the main.py file to load it explicitly.  And the code file doesn't have to be called "main.py" -- "anything.py" will work just as well, I think.

Bill

Michelle Kaiser

unread,
Jul 19, 2017, 10:57:34 AM7/19/17
to Kivy users support
Bill,  That's exactly what I needed to know!  It's working much better now.  Thanks!

Samuel Focht

unread,
Aug 11, 2017, 3:38:18 AM8/11/17
to Kivy users support
I'm new to kivy like you.  Have you seen anything to create a list on one screen and display on another?

Sam
Reply all
Reply to author
Forward
0 new messages