Skip to content

Unable to Add Images to nb using Clipboard in Windows-WSL Environment #322

Open
@selmaohneh

Description

@selmaohneh

Issue Title

Unable to Add Images to nb using Clipboard in Windows-WSL Environment

Issue Description

I am currently working in a Windows environment, utilizing Windows Subsystem for Linux (WSL) and am encountering issues when trying to add images directly from the clipboard to nb.

My workflow involves capturing images with the Windows Snipping Tool, where there is an option to copy the image directly to the clipboard. However, when attempting to add these images to nb using the clip plugin, I am met with the following error:

Error: Can't open display: (null)  
Added: [118] 🌄 20240614114257.jpg  

The image appears to be added but the file size is 0B, and it cannot be opened.

I am looking for a solution or workflow that would allow me to add images directly from the clipboard, without the need to first save these images to disk.

Environment

  • Windows Subsystem for Linux
  • nb version: 7.12.1

Steps to Reproduce

  1. Capture image using Windows Snipping Tool.
  2. Copy the captured image to clipboard.
  3. Attempt to add the image to nb using the clip plugin (nb clip sampleimage .png).

Expected Behavior

The image should be successfully added to nb and should be viewable/openable.

Actual Behavior

An error message is received and the image added to nb has a file size of 0B, making it unviewable/unopenable.

I would appreciate any guidance or insights into how I might resolve this issue. Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions