New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ttk.Checkbutton OSError #143
Comments
Can you paste the exact error you are getting? Can you give me a few more pieces of information:
Do you get the same error if you do not import tkinter and instead used ttk.Window to create the root? |
python version 3.9.7 I get the same errot still with ttk.window() import ttkbootstrap as ttk
from ttkbootstrap.constants import *
root = ttk.Window()
root.geometry('800x500')
c = ttk.Checkbutton(root)
c.grid()
root.mainloop() This is the error: Traceback (most recent call last): |
@aatambo, can you show the image of it working with the bootstyle? I'm confused why it would work at all with that error message. |
Does that mean it is either an Os related issue or python version? |
I'm not sure. From the error, it appears that it is having trouble finding the FreeSerif font, but that wouldn't make sense if you say it is working with a bootstyle. I'm going to download the OS and try it out. I'm curious about it anyway. I'll see if I can get the same error to show up. Might be a day or so as I have to work. |
ok, for whatever reason, the FreeSerif font is not installed in that distribution of Manjaro. Perhaps it's a minimal install version? The reason that the round-toggle works is because it does not use a font to render the button. The regular checkbox draws a checkmark using the FreeSerif font (on Linux) onto an image which displays in the button. In the short term, you can fix by installing the FreeSerif font. I'm not familiar enough with Arch Linux to know how to do that. In the meantime, I'll look into adding another font check (perhaps the Noto family) so that it works with this distribution out-of-the-box. |
Okay thanks for your good work with ttkbootstrap. |
You can leave it open until I resolve the font issue with that OS |
I was able to test this fix successfully on a Monjaro installation with version 1.5.1 using the new fallback font. |
Cool thanks |
Run this code and you will find an OSError: cannot open resource
N/B : If i add bootstyle='success-round-toggle' it works
What might be wrong? Why does it not work without a bootstyle configuration?
I'm using manjaro linux incase it might be helpful.
The text was updated successfully, but these errors were encountered: