israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.99k stars 395 forks source link

import ttkbootstrap causes error in locale.py #439

Open DenTroge opened 1 year ago

DenTroge commented 1 year ago

Desktop (please complete the following information):

ttkbootstrap v 1.10.1 windows 11

Describe the bug

File "D:\test\test.py", line 2, in import ttkbootstrap as ttk File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap__init.py", line 3, in from ttkbootstrap.widgets import * File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\widgets.py", line 14, in from ttkbootstrap.dialogs import Querybox File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\dialogs\init__.py", line 1, in from ttkbootstrap.dialogs.dialogs import * File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\dialogs\dialogs.py", line 536, in class DatePickerDialog: File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\site-packages\ttkbootstrap\dialogs\dialogs.py", line 566, in DatePickerDialog locale.setlocale(locale.LC_ALL, locale.setlocale(locale.LC_TIME, "")) File "C:\Users\atlee\AppData\Local\Programs\Python\Python311\Lib\locale.py", line 626, in setlocale return _setlocale(category, locale) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ locale.Error: unsupported locale setting

To Reproduce

write "import ttkbootstrap as ttk" in script

Expected behavior

should import ttkbootstrap

Screenshots

No response

Additional context

commenting out line 566 in ttkbootstrap\dialogs\dialogs.py seems to be a workaround

Neoakay005 commented 1 year ago

have the same problem man. I don't know how to solve that shit