0
我想在我的電腦運行這段代碼,我想盡一切辦法做到這一點,但我總是得到同樣的錯誤,我不知道該怎麼辦......與文本輸入Kivy錯誤
import kivy
kivy.require('1.0.7')
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.codeinput import CodeInput
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.textinput import TextInput
from kivy.core.window import Window
from kivy.uix.accordion import Accordion, AccordionItem
Window.clearcolor = (1, 1, 1, 1)
class Myapp(App):
def build(self):
self.layout = BoxLayout(padding=50,orientation="vertical",spacing=30)
Labe_Prin = Label(text="Bienvenido al login",font_name="data/fonts/Union_soap.ttf",color=(0,0,0,0.5),font_size=50)
Label1 = Label(text="Ingrese Usuario: ",color=(0,0,0,1),font_size=(50*0.75),bold=True,italic=False,font_name="data/fonts/English_.ttf")
Entrada1 = TextInput(multiline = False,size_hint=(1,.3),bold=True,font_size=12.3,foreground_color=(.5,.1,.3,1),text="Usuraio",use_bubble=True) #focus=True,use_handles=True
Label2 = Label(text="Ingrese Contrasenia: ",color=(0,0,0,1),font_size=(50*0.75),bold=True,italic=False,font_name="data/fonts/English_.ttf")
Entrada2 = CodeInput(multiline = False,size_hint=(1,.3),italic=True,font_size=12.3,foreground_color=(.5,.1,.3,1),text="Contrasenia",use_buble=True) #Contrasenia
def press(self):
print Entrada1.text
print Entrada2.text
Boton1 = Button(size_hint=(1, .4), text='Login',on_release=press)
self.layout.add_widget(Labe_Prin)
self.layout.add_widget(Label1)
self.layout.add_widget(Entrada1)
self.layout.add_widget(Label2)
self.layout.add_widget(Entrada2)
self.layout.add_widget(Boton1)
return self.layout
if __name__=="__main__":
Myapp().run()
,我有這個錯誤...
[CRITICAL ] [Cutbuffer ] Unable to find any valuable Cutbuffer provider at all!
xclip - OSError: [Errno 2] No existe el archivo o el directorio
File "/usr/lib/python2.7/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python2.7/dist-packages/kivy/core/clipboard/clipboard_xclip.py", line 17, in <module>
p = subprocess.Popen(['xclip', '-version'], stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
xsel - OSError: [Errno 2] No existe el archivo o el directorio
File "/usr/lib/python2.7/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python2.7/dist-packages/kivy/core/clipboard/clipboard_xsel.py", line 15, in <module>
p = subprocess.Popen(['xsel'], stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
我可以執行的代碼,但我不能建立到Android