Avoid importing panel.io.server module
@@ -17,6 +17,9 @@ import param
from panel.config import config
from panel.io.notebook import push
from panel.io.state import state
+try:
+ from panel.io.document import unlocked
+except Exception:
from panel.io.server import unlocked
from pyviz_comms import JupyterComm
