我一直在为一个将书籍存储在数据库中的小程序创建一个 GUI 界面。通常一切正常,但是当我单击“添加按钮”时,在执行操作后,程序关闭,我可以在终端上阅读:
The program 'python' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 4916 error_code 3 request_code 15 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
我真的不明白这是什么错误。我正确使用 Tkinter 库来创建 GUI(窗口、按钮、表单、表格......)谢谢大家