Search code examples
pythonbokehtornado

Error while running bokeh server in dev mode


When running:

bokeh serve --dev --show my-bokeh

The server starts and it works, but when I update the code of the application I expected it to refresh cause the "--dev" flag but it doesn't update and I'm getting this error:

 C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\dashtest-XGo0CCLY-py3.10\Scripts\python.exe:
 Error while finding module specification for '__main__' (ValueError: __main__.__spec__ is None)

I didn't find any reference about this error related to bokeh.

The issue occurs for every code that I'm using, but for instance I try the example at the official repo: https://github.com/bokeh/bokeh/tree/branch-3.0/examples/server/app/crossfilter/templates

Edit, I added the issue here, with the specs of my systems (which may or may not be relevant):

https://github.com/bokeh/bokeh/issues/12471


Solution

  • Already solved at the github issue: https://github.com/bokeh/bokeh/issues/12471 by @caroarriaga, just call the bokeh server using:

    python -m bokeh serve my-bokeh --dev