I'm using pandastable to implement a pandas dataframe into my tkinter window however, an error:
'NoneType' object has no attribute 'bind_all'
Keeps coming up when I use this line:
table = pt = Table(window, dataframe=stats)
full code:
import tkinter as tk
import pandas as pd
from pandastable import Table, TableModel
places = {"Place":['1st'], "Name":['Derik'], "Time":['1.89']}
window = tk.Tk()
stats = pd.DataFrame.from_dict(places)
table = Table(window, dataframe=stats)
The error is because
pandastablewants you to put the widget inside a container and not a window. You can find this out by checking the line 88 and line 264 of thepandastablesource code:As you can see,
self.parentframeis the parent you pass in, in your case,window. And in line 264, they access themasterof theself.parentframe, which isNonebecause root windows don't have masters. But other widgets like frames do.So all you have to do is, put this widget inside a container like
Frame: