CustomTkinter
CustomTkinter copied to clipboard
Can't use CustomTkinter in Linux Pop Os
When trying to run any of the customtkinter example scripts I get the error:
[xcb] Unknown sequence number while appending request
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python3: ../../src/xcb_io.c:157: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed.
I have no idea if this is a Linux problem, Pop Os problem, or tkinter problem. Could anyone help? thanks
Looking at this further; using the complex_example.py script everything works fine until it reaches:
self.logo_label = customtkinter.CTkLabel(self.sidebar_frame, text="CustomTkinter", font=customtkinter.CTkFont(size=20, weight="bold"))
then the message appears.
I have the same issue when using python 3.13. The same program works with python 3.12.
Having the same issue in Linux Mint t 22.1 Xia as well using Python 3.12.9:
[xcb] Unknown sequence number while appending request [xcb] You called XInitThreads, this is not your fault [xcb] Aborting, sorry about that. python: ../../src/xcb_io.c:157: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed.
Having the same issue in Arch Linux.
Having the same issue on Raspberry Pi OS.
Looking at it further, tk.Label or tk.Button produces the same issue, while ttk.Label and ttk.Button works properly.
Another thing I noticed. The following code blocks produces the errors:
import customtkinter as ctk
app = ctk.CTk()
app.wm_title("Test window")
ctk.CTkButton(app, text="Hello world!").grid()
app.mainloop()
import customtkinter as ctk
import tkinter as tk
app = ctk.CTk()
app.wm_title("Test window")
ctk.CTkButton(app, text="Hello world!").grid()
tk.Button(app, text="Hello world!").grid()
app.mainloop()
But using TTK instead doesnt produce the same error:
import customtkinter as ctk
from tkinter import ttk
app = ctk.CTk()
app.wm_title("Test window")
ctk.CTkButton(app, text="Hello world!").grid()
ttk.Button(app, text="Hello world!").grid()
app.mainloop()
But this code doesnt produce the error:
import customtkinter as ctk
app = ctk.CTk()
app.wm_title("Test window")
app.mainloop()
And this code does (even without .pack() or .grid()):
import customtkinter as ctk
app = ctk.CTk()
app.wm_title("Test window")
ctk.CTkLabel(app, text="Hello, world!")
app.mainloop()
Please let me know if this is the same result that everybody gets, we might be able to reach somewhere!
I get the error with this as well:
import customtkinter as ctk
from tkinter import ttk
app = ctk.CTk()
app.wm_title("Test window")
ctk.CTkButton(app, text="Hello world!").grid()
ttk.Button(app, text="Hello world!").grid()
app.mainloop()
only this doesn't result in an error:
import customtkinter as ctk
app = ctk.CTk()
app.wm_title("Test window")
app.mainloop()