Http 500 when render with lumen

Hi all, I hope you are well.

When I create a txt file in jupyterlab 3.2.5 the notebook menu shows the option “Render with Lumen” but if i click on this button i get “500: Internal Server Error” and in the log:


Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/opt/conda/lib/python3.9/site-packages/panel/io/jupyter_server_extension.py", line 93, in get
    app = build_single_handler_application(path)
  File "/opt/conda/lib/python3.9/site-packages/bokeh/command/util.py", line 133, in build_single_handler_application
    raise ValueError("Expected a '.py' script or '.ipynb' notebook, got: '%s'" % path)
ValueError: Expected a '.py' script or '.ipynb' notebook, got: '/home/jovyan/work/untitled1.txt'

Is there a way to fix this or hide the button?

Thanks in advance
Mariano

That’s not part of default JupyterLab. You’ve either added and enabled an extension. Or something to your browser, possibly? Or wherever you are working has added it?
Disable that, reload the page, and perhaps it should go away.

You can see what vanilla JupyterLab version 3.2.5. should look & behave by clicking here. (At present version 3.2.5 is the version that it is opening with that link; no guarantee for the future though since it isn’t pinend.)

fomightez, thanks for your reply, it helped me a lot.

The problem is a bit weird, occurs when install two python packages, eo-learn and sentinelhub. I still don’t quite understand why does this happens but I’m on my way to solve.

1 Like

The green button comes from Holoviz’s Panel - high-level app and dashboarding solution for Python. It’s part of their branded-look for now, as you may gather from the top of that page.
You can use it in launches from here.
You’ll see by making a text file there and clicking the render button it also gives the ‘500: Internal Server Error’. That’s a generic catch all http error. It just means Panel doesn’t know how to render standard text. Probably if you wrote code Panel can handle, it would render a dashboard or app.

1 Like

Finally I found the solution:

jupyter labextension disable @pyviz/jupyterlab_pyviz

Thanks fomightez for you help.

1 Like