holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.76k stars 518 forks source link

Jupyter Panel Preview not working on `main` #4819

Closed MarcSkovMadsen closed 1 year ago

MarcSkovMadsen commented 1 year ago

I am on the main branch. I would like to take and contribute a few screenshots I think are missing in the documentation.

I would like one using the Panel Jupyter Preview. But it does not work for me. I'm on the main branch of Panel. I'm running inside my panel_dev python environment. And that is also where Jupyterlab is installed and started from.

image

404 : Not Found
You are requesting a page that does not exist!

My version of Jupyterlab is 3.6.3.

MarcSkovMadsen commented 1 year ago

Cannot get it working with panel==1.0.0rc7 either

image

Let me try a clean python environment

MarcSkovMadsen commented 1 year ago

I just tried creating a python environment from scratch with panel==1.0.0rc7 and jupyterlab and the Jupyter Panel Preview does not work for me. Its just blank.

image

MarcSkovMadsen commented 1 year ago

I just tried it on my Jupyterhub. And its not working there either.

The JupyterHub base environment is running

panel==0.14.4 bokeh==2.4.3

My panel_dev environment is running

panel==1.0.0rc7, bokeh==3.1.1

image

Uncaught Error: Cannot find module '@bokehjs/models/layouts/alignments'

I have tried hard refreshing my browser

philippjfr commented 1 year ago

I've tested it extensively in all the setups you've described and have seen zero issues. Can you write up step by step instructions on these setups?

philippjfr commented 1 year ago

For example here's my initial test:

conda create -n jlab_test
pip install jupyterlab panel==1.0.0rc7 jupyterlab
Screen Shot 2023-05-11 at 11 42 45
philippjfr commented 1 year ago

Also just tested a conda env:

conda create -n jlab_test_conda -c pyviz/label/dev -c conda-forge jupyterlab panel==1.0.0rc7

No issues on my end.

philippjfr commented 1 year ago

And we have this running on our JupyterHub without issue too.

philippjfr commented 1 year ago

The JupyterHub base environment is running panel==0.14.4 bokeh==2.4.3

This is a problem, right now the base env determines where the Bokeh resources are served from. I might be able to fix this though. That will only fix future incompatibilities, panel==0.14.4 will continue to serve the old resources.

philippjfr commented 1 year ago

Can you also provide console logs in the cases where it just shows a blank page?

philippjfr commented 1 year ago

I've had a few people independently confirm that this works for them, this is currently the only release blocker so please report back asap.

MarcSkovMadsen commented 1 year ago

Hi @philippjfr

I dont know when I will get the time to investigate. I've already spent hours on trying to figure out What goes wrong or find workarounds without luck.

MarcSkovMadsen commented 1 year ago

I just tried again with a totally fresh environment @philippjfr

python -m venv .venv
source .venv/Scripts/activate
python -m pip install pip -U
python -m pip install panel==1.0.0rc7 jupyterlab
pip freeze
jupyter lab

requirements.txt

Notebook

import panel as pn

pn.extension()

pn.panel(f"Hello Panel {pn.__version__} world").servable()

image

image

Terminal Logs

logs.txt

In the logs I notice

...
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name 
will be deprecated in future releases of Jupyter Server.
...
Please note that updating to Notebook 7 might break some of your extensions.
...
wrote error: 'No such file or directory: WorkingInNotebook.ipynb'

If this has an effect, I don't know.

If I try to open the iframe link http://localhost:8888/panel-preview/render/Untitled.ipynb directly the page never loads.

Just spins forever

image

If I run which jupyter it points to the right .venv folder.

MarcSkovMadsen commented 1 year ago

I also tried your conda command @philippjfr conda create -n jlab_test_conda -c pyviz/label/dev -c conda-forge jupyterlab panel==1.0.0rc7. It does not work either

image

This is the log from the installation

log_conda.txt

This is the output of conda list --export.

conda_requirements.txt

MarcSkovMadsen commented 1 year ago

Continuing on the conda environment above. I conda install ipykernel nb_conda_kernels.

The the logs start to show more info

(jlab_test_conda) C:\repos\private\tmp>jupyter lab
[I 2023-05-12 06:24:21.475 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-05-12 06:24:21.499 ServerApp] Package jupyter_server_terminals took 0.0241s to import
[I 2023-05-12 06:24:21.499 ServerApp] Package nbclassic took 0.0000s to import
[W 2023-05-12 06:24:21.499 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-12 06:24:21.507 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-05-12 06:24:21.507 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-12 06:24:23.522 ServerApp] Package panel.io.jupyter_server_extension took 2.0132s to import
[W 2023-05-12 06:24:23.530 TerminalsExtensionApp] Config option `kernel_spec_manager_class` not recognized by `TerminalsExtensionApp`.  Did you mean `terminal_manager_class`?
[W 2023-05-12 06:24:23.530 TerminalsExtensionApp] Config option `kernel_spec_manager_class` not recognized by `TerminalsExtensionApp`.  Did you mean `terminal_manager_class`?
[W 2023-05-12 06:24:23.538 TerminalsExtensionApp] Config option `kernel_spec_manager_class` not recognized by `TerminalsExtensionApp`.  Did you mean `terminal_manager_class`?
[I 2023-05-12 06:24:23.538 ServerApp] jupyter_server_terminals | extension was successfully linked.
[W 2023-05-12 06:24:23.558 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.
[W 2023-05-12 06:24:23.563 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.
[W 2023-05-12 06:24:23.565 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.
[I 2023-05-12 06:24:23.565 ServerApp] jupyterlab | extension was successfully linked.
[W 2023-05-12 06:24:23.573 NotebookApp] Config option `kernel_spec_manager_class` not recognized by `NotebookApp`.
[W 2023-05-12 06:24:23.581 NotebookApp] Config option `kernel_spec_manager_class` not recognized by `NotebookApp`.
[W 2023-05-12 06:24:23.589 NotebookApp] Config option `kernel_spec_manager_class` not recognized by `NotebookApp`.
[I 2023-05-12 06:24:23.589 ServerApp] nbclassic | extension was successfully linked.
[I 2023-05-12 06:24:24.189 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-05-12 06:24:24.189 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-05-12 06:24:26.526 ServerApp] [nb_conda_kernels] enabled, 2 kernels found
[I 2023-05-12 06:24:26.942 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-05-12 06:24:26.942 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-05-12 06:24:26.950 LabApp] JupyterLab extension loaded from C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyterlab
[I 2023-05-12 06:24:26.950 LabApp] JupyterLab application directory is C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\share\jupyter\lab
[I 2023-05-12 06:24:26.958 ServerApp] jupyterlab | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-05-12 06:24:26.979 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-05-12 06:24:26.980 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2023-05-12 06:24:26.983 ServerApp] Serving notebooks from local directory: C:\repos\private\tmp
[I 2023-05-12 06:24:26.983 ServerApp] Jupyter Server 2.5.0 is running at:
[I 2023-05-12 06:24:26.983 ServerApp] http://localhost:8888/lab?token=a8bd6a84e5c54ebaef9fb5945f741f0abb3cb77b5e3f9861
[I 2023-05-12 06:24:26.983 ServerApp]     http://127.0.0.1:8888/lab?token=a8bd6a84e5c54ebaef9fb5945f741f0abb3cb77b5e3f9861
[I 2023-05-12 06:24:26.991 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-05-12 06:24:27.183 ServerApp]

    To access the server, open this file in a browser:
        file:///C:/Users/MASMA/AppData/Roaming/jupyter/runtime/jpserver-6868-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=a8bd6a84e5c54ebaef9fb5945f741f0abb3cb77b5e3f9861
        http://127.0.0.1:8888/lab?token=a8bd6a84e5c54ebaef9fb5945f741f0abb3cb77b5e3f9861
[I 2023-05-12 06:24:33.132 LabApp] Build is up to date
[W 2023-05-12 06:24:38.544 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865478543 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:38.545 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:38.550 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865478543 (0b3e57f8b9964da690b213b038d2a44d@::1) 5.73ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:39.541 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:39.563 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (0b3e57f8b9964da690b213b038d2a44d@::1) 23.21ms referer=None
[W 2023-05-12 06:24:39.566 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865479564 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:39.567 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:39.568 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865479564 (0b3e57f8b9964da690b213b038d2a44d@::1) 2.00ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:42.537 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:42.537 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=None
[W 2023-05-12 06:24:42.544 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865482542 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:42.545 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:42.547 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865482542 (0b3e57f8b9964da690b213b038d2a44d@::1) 3.99ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:45.536 ServerApp] 404 GET /api/kernels/7e87257d-252a-4a15-b87e-5e7505cb31cc?1683865485537 (::1): Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc
[W 2023-05-12 06:24:45.536 ServerApp] wrote error: 'Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc)
[W 2023-05-12 06:24:45.544 ServerApp] 404 GET /api/kernels/7e87257d-252a-4a15-b87e-5e7505cb31cc?1683865485537 (0b3e57f8b9964da690b213b038d2a44d@::1) 7.96ms referer=http://localhost:8888/lab/workspaces/auto-q
[W 2023-05-12 06:24:47.536 ServerApp] 404 GET /api/kernels/7e87257d-252a-4a15-b87e-5e7505cb31cc?1683865487537 (::1): Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc
[W 2023-05-12 06:24:47.536 ServerApp] wrote error: 'Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: 7e87257d-252a-4a15-b87e-5e7505cb31cc)
[W 2023-05-12 06:24:47.536 ServerApp] 404 GET /api/kernels/7e87257d-252a-4a15-b87e-5e7505cb31cc?1683865487537 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=http://localhost:8888/lab/workspaces/auto-q
[W 2023-05-12 06:24:48.534 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865488532 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:48.534 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:48.534 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865488532 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:48.544 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:48.544 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=b497defc-d1bc-4d82-aff1-2bcf3eab2cd5 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=None
[W 2023-05-12 06:24:48.551 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865488548 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:48.551 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:48.553 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865488548 (0b3e57f8b9964da690b213b038d2a44d@::1) 2.00ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:49.532 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:49.532 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=None
[W 2023-05-12 06:24:49.539 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865489537 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:49.543 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:49.545 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865489537 (0b3e57f8b9964da690b213b038d2a44d@::1) 6.00ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:51.534 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:51.534 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=None
[W 2023-05-12 06:24:51.543 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865491541 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:51.544 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:51.545 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865491541 (0b3e57f8b9964da690b213b038d2a44d@::1) 2.04ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb
[W 2023-05-12 06:24:54.532 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:54.532 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e/channels?session_id=1abddced-3ee0-41de-bf20-b0857f5c0af4 (0b3e57f8b9964da690b213b038d2a44d@::1) 0.00ms referer=None
[W 2023-05-12 06:24:54.544 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865494538 (::1): Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e
[W 2023-05-12 06:24:54.544 ServerApp] wrote error: 'Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e'
    Traceback (most recent call last):
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\tornado\web.py", line 1769, in _execute
        result = await result
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "C:\Users\MASMA\Anaconda3\envs\jlab_test_conda\lib\site-packages\jupyter_server\services\kernels\kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: e1730861-77c1-4781-b198-12df8fdfe43e)
[W 2023-05-12 06:24:54.545 ServerApp] 404 GET /api/kernels/e1730861-77c1-4781-b198-12df8fdfe43e?1683865494538 (0b3e57f8b9964da690b213b038d2a44d@::1) 1.98ms referer=http://localhost:8888/lab/workspaces/auto-r/tree/Untitled.ipynb

I don't know if the kernel that is not found is reported by the Jupyter Panel Preview?

MarcSkovMadsen commented 1 year ago

I tried to understand the Panel Jupyter Preview code and add some logging. But its hard for me because its a lot of new code and concepts. If there was better logging in that code and I knew how to get Jupyterlab to output those logs, then I believe it could be very helpful.

philippjfr commented 1 year ago

Thanks @MarcSkovMadsen, so based on those logs the extension at least seems to get installed and loaded correctly:

[I 2023-05-12 06:24:23.522 ServerApp] Package panel.io.jupyter_server_extension took 2.0132s to import
...
[I 2023-05-12 06:24:24.189 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
...
[I 2023-05-12 06:24:26.980 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.

There definitely do seem to be some weird configuration issues happening on your side but I can't yet eliminate that the extension is doing something wrong either. Will have some more folks do testing on Windows.

MarcSkovMadsen commented 1 year ago

Again more logs would be helpful.

Jupyter is also a bit complicated because even though I install it from scratch in a virtual environment it is interacting with other virtual environments as it tries to read them. And there is also some complexity I don't understand in that notebook kernels and conda kernels do not seem to be the same thing.

The issues I can imagine are 1. Somehow my base Anaconda environment is corrupted or 2. something like windows path is not properly supported by the Jupyter Panel Preview or 3. The Jupyter Panel Preview tries to save something to a location that is readonly.

krairy commented 1 year ago

I started to have a very similar issue (infinite loading screen in the vidget and tornado.web.HTTPError: HTTP 404: Not Found (No such file or directory: TheTestApp.ipynb) error). It worked fine until I installed 'awesome_panel' into the environment with pip. Since then, I deleted and reinstalled JupyterLab and the Panel and it did not help.

Maybe just a coincedence and there was something else crushing the vidget.

UPD: it's not just the vidget, the app is also unresponsive (the chart is not updating) panel

MarcSkovMadsen commented 1 year ago

Dont install Awesome panel or any of the other extensions I'm maintaining. I still need help to upgrade those.

Please comment in this issue if you think the extensions should be working in 1.0. https://github.com/holoviz/panel/issues/4957

Thanks