Skip to content

Copying SVG cell output fails on first attempt in VSCode (Web, Codespaces) #265020

@lukocode

Description

@lukocode

When copying SVG output from a Jupyter notebook cell in VS Code (Web, Codespaces), the paste operation typically fails on the first attempt. You usually need to repeat the copy-paste process one or more times before it succeeds.

Steps to Reproduce

  1. Create a new Jupyter notebook file.

  2. Generate SVG output using the following code snippet:

import matplotlib.pyplot as plt
import numpy as np
%config InlineBackend.figure_format = 'svg'
random_integers = np.random.randint(0, 101, size=1000)
plt.hist(random_integers, bins=10, edgecolor='black')
plt.show()
  1. In the top-left corner of the cell output, click the three-dot menu and select Copy Cell Output.
Image
  1. Attempt to paste the copied output into an application that supports image pasting (e.g., Microsoft Word).
  • The paste operation will likely fail on the first attempt.
  • You should see No blob data to write to clipboard error in the browser console.
  • Repeat steps 3 and 4 until the paste succeeds.
  • In most cases, the second attempt works, but sometimes multiple retries are needed.

Version: 1.103.2
Commit: 6f17636
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Embedder: codespaces

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersnotebook-outputverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions