Skip to content
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

_tkinter.TclError: unknown option "-style" when using ttkbootstrap #213

Open
sandsmichael opened this issue Mar 25, 2022 · 2 comments
Open

Comments

@sandsmichael
Copy link

sandsmichael commented Mar 25, 2022

Unable to use pandastable with certain themed tkinter window. Seems to work fine with ThemedTk but throws an exception when using ttkbootstrap. Do you know how to fix this incompatibility?

import ttkbootstrap as ttk

    self.table.show()
  File "/Users/michaelsands/venvs/venv/lib/python3.9/site-packages/pandastable/core.py", line 281, in show
    self.Yscrollbar = AutoScrollbar(self.parentframe,orient=VERTICAL,command=self.set_yviews)
  File "/Users/michaelsands/venvs/venv/lib/python3.9/site-packages/ttkbootstrap/style.py", line 4872, in __init__
    self.configure(style=ttkstyle)
  File "/Users/michaelsands/venvs/venv/lib/python3.9/site-packages/ttkbootstrap/style.py", line 4911, in configure
    func(self, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1646, in configure
    return self._configure('configure', cnf, kw)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1636, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-style"
@sandsmichael sandsmichael changed the title _tkinter.TclError: unknown option "-style" when using tkinter.ttk _tkinter.TclError: unknown option "-style" when using ttkbootstrap Mar 29, 2022
@dmnfarrell
Copy link
Owner

I tried ttkbootstrap and tested with dataexplore -t and can't replicate this. Though the widgets look odd. I had to include this from tkinter.ttk import * as well because it says Notebook is not defined.

@myxxmikeyxx
Copy link

I am getting a similar error on mac. Any solution?

I already fixed the AttributeError: module 'PIL.Image' has no attribute 'CUBIC'
Link here

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkcreator/__main__.py", line 471, in <module> creator = ThemeCreator() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkcreator/__main__.py", line 23, in __init__ self.demo_widgets = DemoWidgets(self, self.style) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkcreator/__main__.py", line 245, in __init__ self.create_left_frame() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkcreator/__main__.py", line 455, in create_left_frame sb = ttk.Scrollbar( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkbootstrap/style.py", line 4963, in __init__ self.configure(style=ttkstyle) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ttkbootstrap/style.py", line 5003, in configure func(self, cnf, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1646, in configure return self._configure('configure', cnf, kw) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1636, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: unknown option "-style"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants