
First I created class and pickle it in other python script.
class sample(object):
def input(self):
pass
s = sample()
pd.to_pickle(s, 'data/s.sav')
Then try to import it in bokeh server, I got error.
class sample(object):
def input(self):
pass
a = pd.read_pickle("data/hp.sav")
text = TextInput(title="title", value='test')
curdoc().add_root(text)
curdoc().title = "test"
AttributeError: Can’t get attribute ‘sample’ on <module ‘main’ from ‘C:\Users\Widnows\Anaconda3\Scripts\bokeh.exe\main.py’>
How should I load the pickled class object? I can read other format like dictionary.
Thanks

