【问题标题】:Unable to open device "/dev/input/event14". Please ensure you have the appropriate permissions无法打开设备“/dev/input/event14”。请确保您具有适当的权限
【发布时间】:2020-07-27 11:32:35
【问题描述】:

我是 kivy 包的新手,运行程序时收到警告 无法打开设备“/dev/input/event14”。请确保您具有适当的权限。 但程序执行成功,但我不知道为什么会收到此警告

main.py

from kivy.app import App
from kivy.uix.widget import Widget
class PongBall(Widget):
    pass

class PongGame(Widget):
    pass

class PongApp(App):
    def build(self):
        return PongGame()

PongApp().run()

pong.kv

<PongBall>
    size : 50,50
    canvas:
        Ellipse:
            pos : self.pos
            size: self.size


<PongGame>
    canvas:
        Rectangle:
            pos :self.center_x-5,0
            size:10,self.height

    Label:
        font_size : 70
        center_x  : root.width/4
        top : root.top-50
        text : "0"

    Label:
        font_size : 70
        center_x  : root.width*3/4
        top : root.top-50
        text : "0"

    PongBall:
        center : self.parent.center

【问题讨论】:

    标签: python kivy


    【解决方案1】:

    如果一切似乎都正常,那么您可以放心地忽略它,这只是表示 Kivy 的扫描无法访问输入设备。

    【讨论】:

    • 我不是 OP,但对我来说,事情不正常!应该会打开一个新窗口,但事实并非如此。基本上窗口冻结,我什至不能关闭它。
    猜你喜欢
    • 1970-01-01
    • 2019-02-13
    • 2019-06-28
    • 2021-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-12
    • 1970-01-01
    相关资源
    最近更新 更多