iniself/noba

ERROR:bokeh.server.views.ws:Refusing websocket connection.

Closed this issue · 1 comments

Hello! I got the following error in notebook. I tried both VS Code and Jupyter Notebook - same error.

Appreciate any solution!

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'vscode-webview://0lj9hh483va927cadklatiu5affjj5cn3b349he4cl71d36qc4p6/'; use --allow-websocket-origin=0lj9hh483va927cadklatiu5affjj5cn3b349he4cl71d36qc4p6 or set BOKEH_ALLOW_WS_ORIGIN=0lj9hh483va927cadklatiu5affjj5cn3b349he4cl71d36qc4p6 to permit this; currently we allow origins {'localhost:8889'} WARNING:tornado.access:403 GET /ws?id=348b26a3-e939-4e81-b383-da0df5147ff8&origin=bce4bbf1-101d-44db-883b-e3db4f31e0a2&swVersion=4&extensionId=&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=notebookRenderer (::1) 18.06ms

I have found the solution:

import os
os.environ["BOKEH_ALLOW_WS_ORIGIN"] = '0lj9hh483va927cadklatiu5affjj5cn3b349he4cl71d36qc4p6'