Ajatt-Tools / PasteImagesAsWebP

🍙 An Anki add-on that makes your images small.
https://ankiweb.net/shared/info/1151815987
GNU Affero General Public License v3.0
22 stars 5 forks source link

Update breaks cwebp on macOS ("cwebp failed") #21

Open kvn1351 opened 1 year ago

kvn1351 commented 1 year ago

Hi, the addon suddenly stopped working. There's no error but the tooltip mentions cwebp failed.

I've checked if the executables are present. And yes, they are. Nothing has been changed or touched since it worked. Besides the update perhaps.

Version ⁨2.1.54 (b6a7760c)⁩ Python 3.9.7 Qt 6.3.1 PyQt 6.3.1 MacOS ARM

Thanks for any support :)

kvn1351 commented 1 year ago

I can confirm that it's the update. I got the old version from a backup and it works perfectly.

tatsumoto-ren commented 1 year ago

Thanks for the info. Contributions are welcome.

yifan0414 commented 1 year ago

I had the same computer configuration and had the problem and the same solution😂, use the github release version 1.5 feel well.

Aquafina-water-bottle commented 1 year ago

I'm not sure if this is the same issue, but after a recent update, I got a permission error from 1151815987/support/cwebp, and had to run chmod u+x cwebp for it to work. Would this be the source of the error? @tatsumoto-ren

P.S. I was looking to see if I can just make a quick PR, but after doing a super quick search, I couldn't find the executables in the repository. I'm guessing they're packed with the addon itself outside of this repository.

tatsumoto-ren commented 1 year ago

Yes, the executables are added when you run package.sh.

tatsumoto-ren commented 1 year ago

@kvn1351

ARM

The executables included with this add-on are for x86-64. If your computer has a different architecture, install cwebp and make sure it is in you PATH. Then it should work.

kvn1351 commented 1 year ago

While this surely would lead to a performance improvement, it's not the reason we're having this issue. Because the previous, working, version had the very same x86-64 executables no?

Intel executables get seamlessly translated on the fly by Rosetta2 in most cases, including cwebp. But thanks for the suggestion!

kvn1351 commented 1 year ago

I'm not sure if this is the same issue, but after a recent update, I got a permission error from 1151815987/support/cwebp, and had to run chmod u+x cwebp for it to work. Would this be the source of the error? @tatsumoto-ren

P.S. I was looking to see if I can just make a quick PR, but after doing a super quick search, I couldn't find the executables in the repository. I'm guessing they're packed with the addon itself outside of this repository.

So does it work after that? (I can't test right now)

Aquafina-water-bottle commented 1 year ago

I'm not sure if this is the same issue, but after a recent update, I got a permission error from 1151815987/support/cwebp, and had to run chmod u+x cwebp for it to work. Would this be the source of the error? @tatsumoto-ren P.S. I was looking to see if I can just make a quick PR, but after doing a super quick search, I couldn't find the executables in the repository. I'm guessing they're packed with the addon itself outside of this repository.

So does it work after that? (I can't test right now)

It does indeed work for me, but as mentioned before, it could be a different issue.