You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using grabclipboard on X11 session with wl-paste utility installed regardless if xclip is installed
Using grabclipboard on Wayland session without wl-paste but xclip is installed
What did you expect to happen?
If xclip is installed, xclip command should be used
If xclip is not installed, raise NotImplementedError
Raise NotImplementedError
What actually happened?
wl-paste command is used instead of xclip
>>> ImageGrab.grabclipboard()
Failed to connect to a Wayland server
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[path redacted]/python3.11/site-packages/PIL/ImageGrab.py", line 144, in grabclipboard
output = subprocess.check_output(["wl-paste", "-l"]).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 466, in check_outputreturn run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 571, in runraise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['wl-paste', '-l']' returned non-zero exit status 1.
xclip is used and failed as it cannot access Wayland clipboard
>>> ImageGrab.grabclipboard()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "[path redacted]/lib/python3.11/site-packages/PIL/ImageGrab.py", line 165, in grabclipboardraiseChildProcessError(msg)
ChildProcessError: xclip error: Error: target image/png not available
What are your OS, Python and Pillow versions?
OS: Debian 12
Python: 3.11.2
Pillow: 10.0.0
fromPILimportImageGrabImageGrab.grabclipboard()
The text was updated successfully, but these errors were encountered:
What did you do?
grabclipboard
on X11 session withwl-paste
utility installed regardless ifxclip
is installedgrabclipboard
on Wayland session withoutwl-paste
butxclip
is installedWhat did you expect to happen?
xclip
is installed,xclip
command should be usedxclip
is not installed, raiseNotImplementedError
NotImplementedError
What actually happened?
wl-paste
command is used instead ofxclip
xclip
is used and failed as it cannot access Wayland clipboardWhat are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: