python - kivy: __init__() is missing x required positional arguments -


i have class movie follows:

class movie(widget):     def __init__(self, title, image, time, description, trailer, fsk, threed, **kwargs):         super(movie, self).__init__(title, image, time, description, trailer, fsk, threed, **kwargs)         title = stringproperty()         image = stringproperty()         time = stringproperty()         description = stringproperty()         trailer = stringproperty()         fsk = numericproperty()         threed = booleanproperty() 

when run script python interpreter tells me this:

typeerror: __init__() missing 7 required positional arguments: 'title', 'image', 'time', 'description', 'trailer', 'fsk', , 'threed' 

so doing wrong? struggle time already.


whole source code relevant issue:

class movie(widget):     def __init__(self, title, image, time, description, trailer, fsk, threed, **kwargs):         super(movie, self).__init__(title, image, time, description, trailer, fsk, threed, **kwargs)         title = stringproperty()         image = stringproperty()         time = stringproperty()         description = stringproperty()         trailer = stringproperty()         fsk = numericproperty()         threed = booleanproperty()  class mainview(widget):     def __init__(self, **kwargs):         super(mainview, self).__init__(**kwargs)         movies = listproperty()         # movies = self.getmovies()         # movie in movies:         #   self.add_widget(movie)      def getmovies(self, url="http://.../"):         html = lxml.html.parse(url)         titles = html.xpath("//h5")         times = html.xpath("//td[@class='pday ptoday']/span/a")         trailers = html.xpath("//a[@data-modal-trailer-url]/@data-modal-trailer-url")         fsks = html.xpath("//tr[@data-fsk]/@data-fsk")         movies = list()         # in range(0, len(titles)):         #   movie = movie(titles[i].text, "images[i]", times[i].text, "", "https:" + trailers[i][:-11], fsks[i], "no")         #   movies.append(movie)         return movies 

i've found out kv-lang-file reason object initialization error. don't know how fix think other question why __init__ being called


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -