Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In the past I have always used Lios to get text from jpgs or pdfs.
Lios always worked great for me in Ubuntu 20.04!
Now, in Ubuntu 22.04 it won't work. A gtk error.
I used
Quote:
sudo apt-get purge lios
Then I reinstalled, but I am getting the same error, please see below.
Any tips on how to fix this please?
Quote:
pedro@pedro-HP:~$ lios
/usr/lib/python3/dist-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
/usr/lib/python3/dist-packages/lios/ui/gtk/widget.py:24: PyGIWarning: Atk was imported without specifying a version first. Use gi.require_version('Atk', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import Atk
Traceback (most recent call last):
File "/usr/bin/lios", line 3, in <module>
from lios.main import *
File "/usr/lib/python3/dist-packages/lios/main.py", line 27, in <module>
from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
File "/usr/lib/python3/dist-packages/lios/editor.py", line 20, in <module>
from lios.ui.gtk import text_view, tree_view, widget, dialog, file_chooser, containers, window
File "/usr/lib/python3/dist-packages/lios/ui/gtk/widget.py", line 166, in <module>
class Separator(Gtk.HSeparator):
File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/python3/dist-packages/gi/module.py", line 123, in __getattr__
raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gtk' object has no attribute 'HSeparator'
pedro@pedro-HP:~$
PyGIWarning: Gtk was imported without specifying a version first. Use
gi.require_version('Gtk', '4.0') before import to ensure that the right version gets
loaded.
That looks like the issue. There was gtk-1.x and it stayed alive longer than it should have. Gtk-2.x & gtk-3.x are current, but guys must be working on gtk-4.x even while gtk-3.x is getting sorted.
So, something is saying "load gtk" and it's thinking "GTK what??" So it's guessing, and the guess is wrong. Tesseract isn't big into eye candy, so I guess it's Lios that's running gtk. Try specifying gtk-2.x or if that fails, gtk-3.x.
I'm far from the most up-to-date guy here, but palemoon has gtk-2.x, and gtk-3.x versions. My system works better on gtk-2.x. The full version numbers are gth-x.y.z, where
z= bug fix
y = feature addition.
x = Break in compatability.
Now Lios is looking for gtk-4? You'd do better to get a version for gtk-2 or 3.
I found gocr poorly maintained and underperforming. Tesseract was the best but give it plenty of dpi in the input. Lios is on sourceforge. It should say what gtk it works with.
Last edited by business_kid; 04-06-2023 at 01:56 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.