
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
Cirurgia para acelerar o openSUSE em HD externo via USB
Void Server como Domain Control
Modo Simples de Baixar e Usar o bash-completion
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
Como quebrar senha usando john the ripper
[Resolvido] VirtualBox can't enable the AMD-V extension
Como verificar a saúde dos discos no Linux
Como instalar , particionar, formatar e montar um HD adicional no Linux?
Podem me chamar de 1mbecil :) (13)
Não consigo instalar distro antiga no virtualbox nem direto no hd (18)









