I’m trying to load an object with shelve module. This object allows me to retrieve custom formatted numpy matrix from a pandas dataframe in .parquet format.
I’m getting this error.
(base) C:\Users*>bokeh serve --show "C:\Users***\Code\graph\statistics.py"
2018-02-17 12:39:52,727 Starting Bokeh server version 0.12.10 (running on Tornado 4.5.2)
2018-02-17 12:39:52,727 Bokeh app running at: http://localhost:5006/statistics
2018-02-17 12:39:52,727 Starting Bokeh server with process id: 9240
2018-02-17 12:39:54,025 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x00000197F9B79F28>: No module named ‘asset’
File “shelve.py”, line 114, in getitem:
value = Unpickler(f).load() Traceback (most recent call last):
File “C:\Users***\Anaconda3\lib\shelve.py”, line 111, in getitem
value = self.cache[key]
KeyError: ‘evaluator’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\Users***\Anaconda3\lib\site-packages\bokeh\application\handlers\code_runner.py”, line 125, in run
exec(self._code, module.dict)
File “C:\Users*****\Code\graph\statistics.py”, line 119, in
layout = row(widgets, create_figure())
File “C:\Users*****\Code\graph\statistics.py”, line 54, in create_figure
evaluator = save[‘evaluator’]
File “C:\Users***\Anaconda3\lib\shelve.py”, line 114, in getitem
value = Unpickler(f).load()
ModuleNotFoundError: No module named 'asset’
2018-02-17 12:39:54,025 200 GET /statistics (::1) 62.51ms
2018-02-17 12:39:54,322 101 GET /statistics/ws?bokeh-protocol-version=1.0&bokeh-session-id=USYr1G4GploKLcQiZ8Ppwm9BRGisBnXH0rUGGfAjBeb4 (::1) 0.00ms
2018-02-17 12:39:54,322 WebSocket connection opened
2018-02-17 12:39:54,322 ServerConnection created
2018-02-17 12:40:22,234 WebSocket connection closed: code=1001, reason=None
The evaluator object i’m trying to load does not need the asset module, indeed. Also, the asset module is a Python Package folder created with PyCharm that contains the classic init.py empty file. I don’t understand why Bokeh cant load that f*****g object.