Terry J. Reedy <tjre...@udel.edu> added the comment:

You code as posted is buggy.  'settings' maps styles to dicts with possible 
keys ‘configure’, ‘map’, ‘layout’ and ‘element create’.  See
https://docs.python.org/3/library/tkinter.ttk.html#tkinter.ttk.Style.theme_create

I presume '.' refers to all styles, but [] is not a dict, let alone one with 
the allowed keys and values.  Thus for me, in 3.8.9 and 3.10.0 on Win10,

from tkinter import ttk
style = ttk.Style()
style.theme_settings('default', {'.': []})

results in a traceback ending with the true statement
AttributeError: 'list' object has no attribute 'get'

Your code does not match the error you reported, as the AttributeError is 
raised in tkinter.ttk._script_from_settings before calling tk.  If you posted 
the wrong code, and you actually got the error you reported with other code, 
recheck to make sure it matches the doc and if you still get an error, repost 
with OS and full Python version (x.y.z).  If you used an earlier version of 
3.8, please try with the latest release or a later version, as there might have 
been a tkinter bug fix.

----------
nosy: +serhiy.storchaka, terry.reedy
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to