pandastable icon indicating copy to clipboard operation
pandastable copied to clipboard

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

Open sandsmichael opened this issue 4 years ago • 2 comments

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 avatar Mar 25 '22 21:03 sandsmichael

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.

dmnfarrell avatar Apr 16 '22 20:04 dmnfarrell