
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
Gentoo binário em 2026: UEFI, LUKS, Btrfs e Systemd
Trabalhando Nativamente com Logs no Linux
Jogando Daikatana (Steam) com Patch 1.3 via Luxtorpeda no Linux
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Por que sua empresa precisa de uma PKI (e como automatizar EMISSÕES de certificados via Web API)
Instalando NoMachine no Gentoo com Systemd (acesso Remoto em LAN)
Gentoo: Trocando wpa_supplicant pelo iwd no NetworkManager (Systemd)
OCS Inventory NG: Instalação de Agentes Linux e Windows + Autenticação HTTP
Removere linux-image-6... [RESOLVIDO] (2)
Quando vocês pararam de testar distros? (19)
O que houve com slackware ??? (6)









