Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte #16

Closed
NikitaBeloglazov opened this issue Sep 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@NikitaBeloglazov
Copy link
Owner

Bug info / steps to reproduce / versions

wl-clipboard version: 2.2.1
Happens when you copy a picture, a ytcon crashes
Bug found by @dgudim (thanks 🙏)

It seems this is because wl-clipboard is now working with images by default, and I did not excepted this behaviour.
A fix is ​​needed

Full Traceback:

An unknown error has occurred!

Traceback (most recent call last):
  File "/home/kloud/Downloads/ytcon/src/ytcon/misc/clipboard.py", line 89, in clipboard_checker
    new_clip = clipman.paste()
               ^^^^^^^^^^^^^^^
  File "/home/kloud/Downloads/ytcon/venv/lib/python3.12/site-packages/clipman/__init__.py", line 237, in get
    return call("get")
           ^^^^^^^^^^^
  File "/home/kloud/Downloads/ytcon/venv/lib/python3.12/site-packages/clipman/__init__.py", line 285, in call
    return run_command(['wl-paste'], features=("wl-clipboard_nothing_is_copied_is_ok",))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kloud/Downloads/ytcon/venv/lib/python3.12/site-packages/clipman/__init__.py", line 82, in run_command
    return runner.stdout.decode("UTF-8").removesuffix("\n") # looks like all commands returns \n in the end
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

Printed by exit_with_exception()
@NikitaBeloglazov
Copy link
Owner Author

Fixed in v3.2.5

If the problem still occurs, please update clipman, and if it does not help, reopen the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant