Skip to content

[BUG] export_svgs() function creats two files (one is empty) #10273

@mosc9575

Description

@mosc9575

software version info (bokeh, python)

Python: 3.6.10
Bokeh: 2.1.1

Description of expected behavior and the observed behavior

While generating a svg export in bokeh 2.1.1 an unnecessary empty file is created, too. The second file gets the same name as the first one with a suffix "_1" right before the file extension.
It was expected that only on file is created.

Minimal example

import numpy as np
import bokeh.plotting as bk_plt
import bokeh.io as bk_io

bk_plt.output_notebook()

N = 500
x = np.linspace(0, 10, N)
y = np.linspace(0, 10, N)
xx, yy = np.meshgrid(x, y)
d = np.sin(xx)*np.cos(yy)

p2 = bk_plt.figure(x_range=(0, 10), y_range=(0, 10))
p2.image(image=[d], x=0, y=0, dw=10, dh=10, palette="Spectral11", alpha = 0.5)
p2.output_backend = 'svg'
bk_io.export_svgs(p2, filename = 'asdf.svg')

Screenshots

code_svg_exports
svg_exports

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions