KeyError: 'legend'
Hi,
I get the following error:
Traceback (most recent call last):
File "C:\Users\yshub\Documents\GitHub\TelegramChatStats\telegram-statistics.py", line 267, in <module>
main()
File "C:\Users\yshub\Documents\GitHub\TelegramChatStats\telegram-statistics.py", line 211, in main
raw = calculate_graphs(chat_data, date_filter, wordlist)
File "C:\Users\yshub\Documents\GitHub\TelegramChatStats\telegram-statistics.py", line 149, in calculate_graphs
return _message_graphs(chat_data, date_filter, wordlist)
File "C:\Users\yshub\Documents\GitHub\TelegramChatStats\_message_graphs.py", line 278, in _message_graphs
histogram_month(
File "C:\Users\yshub\Documents\GitHub\TelegramChatStats\_message_graphs.py", line 435, in histogram_month
fig.vbar(
File "C:\Users\yshub\miniconda3\lib\site-packages\bokeh\plotting\_decorators.py", line 87, in wrapped
return create_renderer(glyphclass, self.plot, **kwargs)
File "C:\Users\yshub\miniconda3\lib\site-packages\bokeh\plotting\_renderer.py", line 133, in create_renderer
update_legend(plot, legend_kwarg, glyph_renderer)
File "C:\Users\yshub\miniconda3\lib\site-packages\bokeh\plotting\_legends.py", line 57, in update_legend
_LEGEND_KWARG_HANDLERS[kwarg](value, legend, glyph_renderer)
KeyError: 'legend'
If I'm not mistaken, it might have to do with the current Bokeh version? Any help is highly appreciated! And thanks in advance :)
This is an issue with the bokeh version. Use bokeh==2.4.3 to fix it.
Getting the same error with the updated bokeh version, any ideas on how to fix this? Thank you!
If it really is the exact same error, then double check if you have the right version of bokeh installed with pip show bokeh. It should say Version: 2.4.3.
If that's installed, do you maybe use venv or conda?
I'm having the exact same issue. The version of bokeh is 3.0.3, though. Do I have to downgrade?
Edit: I have downgraded to version 2.4.3. Now it works for me, although it shows errors aswell.
For me it didn't work until I installed via conda forge. I can't tell you why though.
conda install -c conda-forge bokeh==2.4.3
i have 2.4.3 version yet i still see the error