TenderOwl / Frog

Extract text from any image, video, QR Code and etc.
https://getfrog.app/
MIT License
567 stars 39 forks source link

"Failed to decode data" #192

Closed garrett closed 6 months ago

garrett commented 7 months ago

Any image from any source gives me "Failed to decode data". This comes from screenshotted images, pasted images, drag and dropped images, and files from file selectors. I've tried other languages (default in English, but also German).

image

Frog use to work until recently. This must've been due to a recent upgrade.

I have Frog installed from Flathub, and I tried trashing all user data and uninstalling + reinstalling Frog too.

I'm on Fedora 40 beta. Frog used to work perfectly, and I love the app.

garrett commented 7 months ago

Running Frog from the command line gives me this:

$ flatpak run com.github.tenderowl.frog

** (python:2): WARNING **: 12:40:57.273: expected enumeration type void, but got PyGLibOptionArg instead
2024-04-16 12:40:57.277 | DEBUG    | frog.widgets.language_popover:__init__:69 - active-language
2024-04-16 12:40:57.294 | DEBUG    | frog.language_manager:active_language:208 - Active language set to <LanguageItem: English, eng>
/app/lib/python3.11/site-packages/frog/window.py:84: Warning: g_variant_type_checked_: assertion 'g_variant_type_string_is_valid (type_string)' failed
  self.install_action("window.share", "provider", self._on_share)
/app/lib/python3.11/site-packages/frog/window.py:84: Warning: g_variant_type_copy: assertion 'g_variant_type_check (type)' failed
  self.install_action("window.share", "provider", self._on_share)
2024-04-16 12:41:05.110 | DEBUG    | frog.main:on_settings_changed:145 - SETTINGS: %s changed
2024-04-16 12:41:08.068 | DEBUG    | frog.services.screenshot_service:decode_image:115 - Remove source set to False
2024-04-16 12:41:08.068 | DEBUG    | frog.services.screenshot_service:decode_image:117 - Decoding with eng+eng language.
2024-04-16 12:41:08.068 | DEBUG    | frog.services.screenshot_service:decode_image:140 - ERROR: 

(All the DEBUG lines at the end are from after the app launches and I try to do something.)

pesader commented 7 months ago

I have the exact same error. Looking at the PyGObject docs, it seems that the problem is that the install_action method is not recognizing "provider" as a valid type in the following line:

self.install_action("window.share", "provider", self._on_share)

This is part of the sharing feature that was introduced by commit 4e17b8276f6891c8417ca69b47458171a56ad931.

pesader commented 6 months ago

Update: that only happens when taking a screenshot! Pasting and opening an image work fine.