Frog
Frog copied to clipboard
[Bug] Frog not starting up
I built a quick debian package. When try to launch it I get the following error:
frog
Traceback (most recent call last):
File "/usr/bin/frog", line 59, in <module>
from frog import main
File "/usr/lib/python3/dist-packages/frog/main.py", line 40, in <module>
from .about_dialog import AboutDialog
File "/usr/lib/python3/dist-packages/frog/about_dialog.py", line 29, in <module>
from frog.config import APP_ID, RESOURCE_PREFIX
File "/usr/lib/python3/dist-packages/frog/config.py", line 33, in <module>
if not os.path.exists(os.path.join(os.environ['XDG_DATA_HOME'], 'tessdata')):
File "/usr/lib/python3.10/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'XDG_DATA_HOME'
I think this is somewhat related to #22 . I built the latest release (1.1.3). Os is debian testing
Also, directly calling /usr/bin/frog instead of frog results in a segfault. Debug:
python3.9-dbg /usr/bin/frog
Traceback (most recent call last):
File "/usr/bin/frog", line 53, in <module>
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 40, in <module>
from . import _gi
ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)
Hey! I could give you an advice, but not a solution.
- To be able to download tesseract models the app requires folder and in Flatpak package there is a limited list of available folders. You could try to check and set this env var in post-install hooks in your deb package to some folder.
- This is also comes from Flatpak packaging. You have to update
PYTHONPATHenv var to add required paths. https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH