我安装了Kivy和Cython。我正在将VirtualBox和Arch Linux与Gnome一起用作我的显示管理器。创建以下应用后,
from kivy.app import App
from kivy.uix.button import Button
class CalcApp(App):
def build(self):
return Button(text="Hello World")
if __name__ == '__main__':
CalcApp().run()
我收到以下错误
[INFO ] [Logger ] Record log in /home/kyle/.kivy/logs/kivy_17-10-19_40.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x0
Serial number of failed request: 151
Current serial number in output stream: 152
如果我运行命令unset DISPLAY,它将按预期工作,但没有选择最小化,最大化和关闭通常可用的窗口的选项。
有没有办法解决此错误,所以我不需要在每次打开新的终端窗口并使其看起来像普通窗口时都键入unset DISPLAY?
最佳答案
看一下Github上的这个问题,看来可能是同样的问题:https://github.com/kivy/kivy/issues/5476
对于后代(如果链接断开),这可能是一个多重采样问题。
尝试以下修复程序:
关于python - 如何解决Kivy错误: Bad Window (invalid Window parameter)?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46839835/