Skip to content

Layouts are not correctly exported #4302

@Guillemdb

Description

@Guillemdb

ALL software version info

Current master branch of the project. Commit 69e931a

Description of expected behavior and the observed behavior

When using the bokeh backend the panel object cannot be exported as a .png file because the fmt parameter is ignored when saving the underlying panel.layout.

Saving with the matplotlib backend works fine for html output. I when exporting the plots as png files in bokeh 2.0 it fails due to a fail in the signature of export_png (now it does only accept to exported object as an argument, while all the other parameters need to be defined as keyword arguments).

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

You can see how the fmt parameter is not processed when saving the layout here:

plot.layout.save(basename, embed=True, resources=resources)

Doing something like this would solve the problem.

# Checking of allowed formats go here
filename = "%s.%s" % (basename, fmt) if fmt != "auto" else basename
plot.layout.save(filename, embed=True, resources=resources)

I am sorry I cannot make a proper PR, I hope this helps you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions