We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to screen grab using WIN + Shift + S, I can't paste the image at all. Here's the original error:
line 1: E5108: Error executing lua Vim:Error invoking 'python_execute' on channel 3 (python3-script-host): Traceback (most recent call last): File "<string>", line 1, in <module> import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; neovim.start_host() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\<USERNAME>\AppData\Local\nvim-data\lazy\pastify.nvim\python3\pastify\main.py", line 90, in paste_text img.save(img_bytes, format="PNG") ^^^^^^^^ AttributeError: 'list' object has no attribute 'save' stack traceback: [C]: at 0x7ff6b58fdf40
I've tried fiddling with that function as such:
img = ImageGrab.grabclipboard() # ImageGrab.grabclipboard returns either a: Image, List of file names or None (text) if isinstance(img, Image.Image): # Check if clipboard contains an image img_bytes = BytesIO() img.save(img_bytes, format="PNG") elif isinstance(img, list): # Check if clipboard contains file paths self.logger(f"Clipboard contains files: {img}", "INFO") return else: # Handle non-image content as text if after: vim.command('normal! "+p') else: vim.command('normal! "+P') return
and here's the output I get:
Clipboard contains files: ['C:\Users\<USERNAME>\AppData\Local\Packages\MicrosoftWindows.Client.Core_cw5n1h2txyewy\TempState\ScreenClip\{2B604A04-454F-4548-9661-5D1DCE676C9A}.png']
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to screen grab using WIN + Shift + S, I can't paste the image at all.
Here's the original error:
I've tried fiddling with that function as such:
and here's the output I get:
Clipboard contains files: ['C:\Users\<USERNAME>\AppData\Local\Packages\MicrosoftWindows.Client.Core_cw5n1h2txyewy\TempState\ScreenClip\{2B604A04-454F-4548-9661-5D1DCE676C9A}.png']
The text was updated successfully, but these errors were encountered: