
Enviado em 18/08/2020 - 11:14h
Estou criando app em python3-kivy e preciso colocar uma classe dinamica como um layout mas quando eu fasso isso ele me da um erro do qual não consigo identifiar
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
class index(GridLayout):
pass
class scrscr(App):
def build(self):
return index()
scrscr().run()
<index>:
cols: 3
rows: 1
BoxLayout:
orientation: "vertical"
size_hint_x: None
width: 120
Button:
text: "scr1"
Button:
text: "scr2"
Button:
text: "scr3"
scrone
<scrone@BoxLayout>:
Button:
text: "btn1"
Label:
text: "lbl1"
<scrtow@BoxLayout>:
Button:
text: "btn2"
Label:
text: "lbl2"
Traceback (most recent call last):
File "scrscr.py", line 11, in <module>
scrscr().run()
File "/home/noah/.local/lib/python3.8/site-packages/kivy/app.py", line 949, in run
self._run_prepare()
File "/home/noah/.local/lib/python3.8/site-packages/kivy/app.py", line 918, in _run_prepare
self.load_kv(filename=self.kv_file)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/app.py", line 691, in load_kv
root = Builder.load_file(rfilename)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 306, in load_file
return self.load_string(data, **kwargs)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 373, in load_string
parser = Parser(content=string, filename=fn)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/lang/parser.py", line 402, in __init__
self.parse(content)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/lang/parser.py", line 511, in parse
objects, remaining_lines = self.parse_level(0, lines)
File "/home/noah/.local/lib/python3.8/site-packages/kivy/lang/parser.py", line 674, in parse_level
if current_property[:3] == 'on_':
TypeError: 'NoneType' object is not subscriptable
Porque Gentoo semi-binário atualmente (desabafo)
A combinação de WMs com compositores feitos por fora
Audacious, VLC e QMMP - que saudades do XMMS
SUNO OpenSource: Crie um servidor de gerador de música com IA
Plantar o Singrante Google Chrome no Void Linux
Lançando Java e Netbeans no Linux
Instalando SVP4 e MPV (VapourSynth) no Gentoo
Migração do KDE Plasma para Cinnamon no Gentoo (com systemd) + Tema Colloid
Como desativar a economia de energia no Gentoo (Systemd, Wi-Fi, USB e SSH)
Comportamento "inesper... ao executar 'apt full-upgrade&... (4)
instalar iso sem pendrive ou dvd (2)
Um filme, uma banda, um jogo, um livro, um anime (ou mangá) (11)









