Fatal Python error (pygame parachute) SegFault

26 views
Skip to first unread message

Tom Garncarz

unread,
Apr 19, 2014, 9:28:09 AM4/19/14
to kivy-...@googlegroups.com
Hi,

I'm getting a strange segfault error when I try to run my relatively basic Kivy code, and I'm wondering if there's anything explicitly wrong that might be causing it. I've tried running it on two different machines, one running Windows 7, the other running Ubuntu 13.04, and I get the same error in both places. I imagine it has something to do with how I'm building the app, but I'm unsure. If anyone could provide any feedback or thoughts, it'd be greatly appreciated. Thanks!

import kivy
import os.path
from kivy.app import App
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.uix.floatlayout import FloatLayout


class Search (Widget):
   
   
def __init__ (self):
        exerciseList
= []
       
self.approposList = exerciseList
       
self.searchType = "exercise"

   
def makeFile (self):
        file
= open("%ssearch.txt" % (searchType), "w")
       
self.file = file

   
def writeFile():
       
if os.path.isfile("exercisesearch.txt"):
            file
= open("exercisesearch.txt", "w")
       
else:    
            file
= makeFile()
       
for entry in exerciseList:
            file
.write(entry + "\n")

   
def on_enter(value):
        approposList
.append(value)
       
self.writeFile()

    searchInput
= TextInput(text = "Search %s" % ("exercise") + "s",
                            multiline
= False)
    searchInput
.bind(on_text_validate = on_enter)


class App (App):
   
def build(self):
        root
= FloatLayout()
        exerciseSearch
= Search()
        root
.add_widget(exerciseSearch)
       
return root

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



Ben Rousch

unread,
Apr 19, 2014, 11:26:15 AM4/19/14
to kivy-...@googlegroups.com
The first thing that sticks out is that your App class is overriding Kivy's App class. Name your app something like MyApp


--
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.
For more options, visit https://groups.google.com/d/optout.



--
 Ben Rousch
   bro...@gmail.com
   http://clusterbleep.net/
Reply all
Reply to author
Forward
0 new messages