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

'get_root' AttributeError when saving Bootstrap template #2460

Closed
thomasbangels opened this issue Jun 30, 2021 · 1 comment · Fixed by #2461
Closed

'get_root' AttributeError when saving Bootstrap template #2460

thomasbangels opened this issue Jun 30, 2021 · 1 comment · Fixed by #2461
Milestone

Comments

@thomasbangels
Copy link

thomasbangels commented Jun 30, 2021

The BootstrapTemplate does not have the 'get_root' attribute which is expected by the save algorithm.

Traceback (most recent call last):
  File "panel_bug_report_template_save.py", line 13, in <module>
    template.save("template_save.html", resources="inline")
  File "/home/bangels/.local/lib/python3.8/site-packages/panel/template/base.py", line 268, in save
    return save(self, filename, title, resources, self.template,
  File "/home/bangels/.local/lib/python3.8/site-packages/panel/io/save.py", line 210, in save
    model = panel.get_root(doc, comm)
AttributeError: 'BootstrapTemplate' object has no attribute 'get_root'

Code to produce the error:

import panel as pn

template = pn.template.BootstrapTemplate(title='Bootstrap Template')

md = pn.pane.Markdown("Greetings from Panel.")
template.main.append(md)

# Show works as expected.
# template.show()

# Save produces the error.
template.save("template_save.html", resources="inline")

Version info:

panel   0.12.0a22 
bokeh   2.3.2
param   1.10.1    
python  3.8.5
OS      Ubuntu 20.04
@philippjfr
Copy link
Member

Closing as "duplicate" of #1066 (although I realize that one says it isn't implemented). Currently template should not have a save method at all since there is no clear ay to support it properly (yet).

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