TenderOwl / Frog

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

[Bug] Failed to extract text from screenshot #124

Open RocketRide9 opened 1 year ago

RocketRide9 commented 1 year ago

Steps to reproduce:

  1. Press Take a Screenshot
  2. Make a screenshot using showed popup
  3. See error

Log:

 ~ flatpak run com.github.tenderowl.frog 
Cache downloaded codes: ['eng', 'osd', 'rus']
Decoding with rus+eng language.
ERROR:  [Errno 2] Нет такого файла или каталога: '/home/dell/%D0%98%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F/Screenshot-11.png'
on_shot_error? Failed to decode data.
on_shot_error? No text found.
RocketRide9 commented 1 year ago

maybe the issue is frog not able to handle Pictures folder with name containing non ASCII symbols

amka commented 1 year ago

This should not be a problem. I tested it, including on folders with Cyrillic and gaps in the name. Perhaps the case is in access, for some reason, Flatpak may not allow access to the specified file. I'll try to repeat it in my system.

soumyaDghosh commented 6 months ago

I am also facing this now. The app fails to extract data when the screenshot is taken directly from the app. It works when we paste the image or open the image from the file manager.

RocketRide9 commented 6 months ago

Initially I was facing this issue only on my home pc, now i can reproduce it on my laptop. Log:

 ~ flatpak run com.github.tenderowl.frog  

** (python:2): WARNING **: 21:55:48.192: expected enumeration type void, but got PyGLibOptionArg instead
2024-05-15 21:55:48.198 | DEBUG    | frog.widgets.language_popover:__init__:69 - active-language
2024-05-15 21:55:48.220 | DEBUG    | frog.language_manager:active_language:208 - Active language set to <LanguageItem: Английский, 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-05-15 21:55:49.764 | DEBUG    | frog.main:on_settings_changed:145 - SETTINGS: %s changed
2024-05-15 21:55:51.478 | DEBUG    | frog.services.screenshot_service:decode_image:115 - Remove source set to False
2024-05-15 21:55:51.478 | DEBUG    | frog.services.screenshot_service:decode_image:117 - Decoding with eng+eng language.
2024-05-15 21:55:51.478 | DEBUG    | frog.services.screenshot_service:decode_image:140 - ERROR: 
2024-05-15 21:56:08.340 | DEBUG    | frog.main:on_settings_changed:145 - SETTINGS: %s changed
2024-05-15 21:56:10.285 | DEBUG    | frog.services.screenshot_service:decode_image:115 - Remove source set to False
2024-05-15 21:56:10.285 | DEBUG    | frog.services.screenshot_service:decode_image:117 - Decoding with eng+eng language.
2024-05-15 21:56:10.285 | DEBUG    | frog.services.screenshot_service:decode_image:140 - ERROR: 
2024-05-15 21:56:14.435 | DEBUG    | frog.language_manager:get_downloaded_codes:234 - Cache downloaded codes: ['eng', 'rus']
2024-05-15 21:56:14.437 | DEBUG    | frog.main:on_settings_changed:145 - SETTINGS: %s changed
azzamsa commented 5 months ago

Have the same isssue

🐡 ❯ flatpak run com.github.tenderowl.frog

** (python:2): WARNING **: 15:10:28.986: expected enumeration type void, but got PyGLibOptionArg instead
2024-06-24 15:10:28.990 | DEBUG    | frog.widgets.language_popover:__init__:69 - active-language
2024-06-24 15:10:29.011 | DEBUG    | frog.language_manager:active_language:208 - Active language set to <Lang
uageItem: Indonesian, ind>
/app/lib/python3.11/site-packages/frog/window.py:84: Warning: g_variant_type_checked_: assertion 'g_variant_t
ype_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-06-24 15:10:42.202 | DEBUG    | frog.main:on_settings_changed:145 - SETTINGS: %s changed
2024-06-24 15:10:43.927 | DEBUG    | frog.services.screenshot_service:decode_image:115 - Remove source set to
 False
2024-06-24 15:10:43.927 | DEBUG    | frog.services.screenshot_service:decode_image:117 - Decoding with ind+eng language.
2024-06-24 15:10:43.927 | DEBUG    | frog.services.screenshot_service:decode_image:140 - ERROR: