Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panel 0.13 JupyterLab preview: 'Resources' object has no attribute 'absolute' #3442

Closed
marcelmindemann opened this issue Apr 22, 2022 · 1 comment

Comments

@marcelmindemann
Copy link

marcelmindemann commented Apr 22, 2022

ALL software version info

I created a minimal virtual environment using:
panel 0.13
jupyterlab 3.3.4
using Python 3.10.

Description of expected behavior and the observed behavior

I am using your unaltered example notebook at https://github.com/holoviz/panel/blob/master/examples/gallery/apis/stocks_altair.ipynb. I open this notebook in JupyterLab.
When using the "Render with Panel" button in JupyterLab, it yields a 500 Internal Server error.
Screen Shot 2022-04-22 at 17 44 39
The log of JupyterLab shows this error:

[E 2022-04-22 17:44:28.816 ServerApp] Uncaught exception GET /panel-preview/render/.venv/lib/python3.10/site-packages/panel/examples/gallery/apis/stocks_altair.ipynb (::1)
    HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/panel-preview/render/.venv/lib/python3.10/site-packages/panel/examples/gallery/apis/stocks_altair.ipynb', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/panel/io/jupyter_server_extension.py", line 116, in get
        page = server_html_page_for_session(
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/bokeh/embed/server.py", line 255, in server_html_page_for_session
        bundle = bundle_for_objs_and_resources(None, resources)
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/bokeh/embed/bundle.py", line 211, in bundle_for_objs_and_resources
        js_files.extend(js_resources.js_files)
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/panel/io/resources.py", line 299, in js_files
        dist_dir = self.dist_dir
      File "/Users/marcel.mindemann/experiments/panel-clean-install/.venv/lib/python3.10/site-packages/panel/io/resources.py", line 259, in dist_dir
        if self.absolute:
    AttributeError: 'Resources' object has no attribute 'absolute'

Complete, minimal, self-contained example code that reproduces the issue

I am running the jupyterlab server with

poetry run jupyter lab
@philippjfr philippjfr added this to the Version 0.13.1 milestone Apr 23, 2022
@philippjfr
Copy link
Member

Thanks for reporting this! This has already been fixed on master here: #3399 and I'll release it as soon as I get a chance in 0.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants