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 serve ... --glob: NameError: name 'base_url' is not defined #3970

Closed
MarcSkovMadsen opened this issue Oct 8, 2022 · 3 comments · Fixed by #3980
Closed

panel serve ... --glob: NameError: name 'base_url' is not defined #3970

MarcSkovMadsen opened this issue Oct 8, 2022 · 3 comments · Fixed by #3980

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Oct 8, 2022

panel==0.14.0

I'm trying to panel serve some apps with the --glob flag. When I go to the index page I get NameError: name 'base_url' is not defined.

Reproducible example

Create two files apps/app1.pyand apps/app2.py with the code

import panel as pn

pn.panel("hello").servable()
panel serve apps/*.py --glob

When I navigate to `https://localhost:5006/ I see

2022-10-08 13:38:28,473 Starting Bokeh server version 2.4.3 (running on Tornado 6.2)
2022-10-08 13:38:28,474 User authentication hooks NOT provided (default user enabled)
2022-10-08 13:38:28,478 Bokeh app running at: http://localhost:5006/app1
2022-10-08 13:38:28,478 Bokeh app running at: http://localhost:5006/app2
2022-10-08 13:38:28,479 Starting Bokeh server with process id: 2153
2022-10-08 13:38:35,174 Uncaught exception GET / (::1)
HTTPServerRequest(protocol='http', host='..', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/bokeh/server/views/root_handler.py", line 66, in get
    self.render(index, prefix=prefix, items=sorted(self.applications.keys()))
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/tornado/web.py", line 865, in render
    html = self.render_string(template_name, **kwargs)
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/tornado/web.py", line 1014, in render_string
    return t.generate(**namespace)
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/tornado/template.py", line 362, in generate
    return execute()
  File "/home/jovyan/repos/private/awesome-panel/panel-cli/_venv/lib/python3_9/site-packages/panel/io/__/_templates/index_html.generated.py", line 5, in _tt_execute
    _tt_tmp = base_url|default("", true)  # /home/jovyan/repos/private/awesome-panel/panel-cli/.venv/lib/python3.9/site-packages/panel/io/../_templates/index.html:23
NameError: name 'base_url' is not defined
@MarcSkovMadsen
Copy link
Collaborator Author

Its the same issue if you serve

panel serve apps/app1.py apps/app2.py

@MarcSkovMadsen
Copy link
Collaborator Author

Its the same issue if you serve

panel serve apps/*.py

@philippjfr
Copy link
Member

Thanks for reporting, panel 0.14.1 coming very soon in that case.

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

Successfully merging a pull request may close this issue.

2 participants