Results 1 to 4 of 4

Thread: How to install my favorite OCR app

  1. #1

    Default How to install my favorite OCR app

    Just installed TumbleWeed with the Cinnamon DE. Last OS was about a year with Fedora, years of Kubuntu before that.

    I like the OCR app LIOS (https://gitlab.com/Nalin-x-Linux/lios-3/). I have the app & some of its dependencies installed, but I'm stuck on
    Code:
    gir1.2-gst-plugins-base-1.0
    gir1.2-gstreamer-1.0
    I searched software.opensuse.org & pkgs.org but can't find OpenSUSE versions of these

    If I try to run LiOS now, I get

    Code:
    /usr/lib/python3.7/site-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk
    /usr/lib/python3.7/site-packages/lios/ui/gtk/print_dialog.py:23: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import PangoCairo
    Traceback (most recent call last):
      File "/usr/local/bin/lios", line 3, in <module>
        from lios.main import *
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 27, in <module>
        from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
      File "/usr/lib/python3.7/site-packages/lios/cam.py", line 19, in <module>
        from gi.repository import GdkX11, GstVideo
      File "/usr/lib64/python3.7/site-packages/gi/importer.py", line 133, in load_module
        'introspection typelib not found' % namespace)
    ImportError: cannot import name GstVideo, introspection typelib not found
    Last edited by tux_peng; 29-Mar-2019 at 11:54. Reason: typo

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,825
    Blog Entries
    15

    Default Re: How to install my favorite OCR app

    Quote Originally Posted by tux_peng View Post
    Just installed TumbleWeed with the Cinnamon DE. Last OS was about a year with Fedora, years of Kubuntu before that.

    I like the OCR app LIOS (https://gitlab.com/Nalin-x-Linux/lios-3/). I have the app & some of its dependencies installed, but I'm stuck on
    Code:
    gir1.2-gst-plugins-base-1.0
    gir1.2-gstreamer-1.0
    I searched software.opensuse.org & pkgs.org but can't find OpenSUSE versions of these

    If I try to run LiOS now, I get

    Code:
    /usr/lib/python3.7/site-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk
    /usr/lib/python3.7/site-packages/lios/ui/gtk/print_dialog.py:23: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import PangoCairo
    Traceback (most recent call last):
      File "/usr/local/bin/lios", line 3, in <module>
        from lios.main import *
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 27, in <module>
        from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
      File "/usr/lib/python3.7/site-packages/lios/cam.py", line 19, in <module>
        from gi.repository import GdkX11, GstVideo
      File "/usr/lib64/python3.7/site-packages/gi/importer.py", line 133, in load_module
        'introspection typelib not found' % namespace)
    ImportError: cannot import name GstVideo, introspection typelib not found
    Hi
    Typelib is the critical error info...

    Code:
    typelib-1_0-GstVideo-1_0
    Use zypper se typelib to see other missing ones....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How to install my favorite OCR app

    Thanks, my dependencies now read
    Code:
    python3, python3-sane, python3-speechd, tesseract-ocr, imagemagick, cuneiform, espeak, poppler-tools, python3-pyenchant,  aspell-en,
    Code:
     typelib-1_0-GstVideo-1_0
    I still get an error, so I might just not be able to run it
    Code:
    /usr/lib/python3.7/site-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk
    /usr/lib/python3.7/site-packages/lios/ui/gtk/print_dialog.py:23: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import PangoCairo
    /usr/lib/python3.7/site-packages/lios/cam.py:19: PyGIWarning: GstVideo was imported without specifying a version first. Use gi.require_version('GstVideo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import GdkX11, GstVideo
    /usr/lib/python3.7/site-packages/lios/ui/gtk/terminal.py:21: PyGIWarning: Vte was imported without specifying a version first. Use gi.require_version('Vte', '2.91') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk, GObject, Vte
    
    (lios:5002): Gtk-WARNING **: 15:03:44.917: Cannot connect attribute 'text' for cell renderer class 'lios+ui+gtk+tree_view+CellRendererToggle' since attribute does not exist
    Traceback (most recent call last):
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 1346, in make_preferences_effective
        self.dict = dictionary.Dict(dictionary.dictionary_language_dict[languages[self.preferences.language]])
      File "/usr/lib/python3.7/site-packages/lios/dictionary.py", line 48, in __init__
        super(Dict,self).__init__(language)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 562, in __init__
        _EnchantObject.__init__(self)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 168, in __init__
        self._init_this()
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 569, in _init_this
        this = self._broker._request_dict_data(self.tag)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 310, in _request_dict_data
        self._raise_error(eStr % (tag,),DictNotFoundError)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 258, in _raise_error
        raise eclass(default)
    enchant.errors.DictNotFoundError: Dictionary for language 'en' could not be found
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/bin/lios", line 8, in <module>
        linux_intelligent_ocr_solution()
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 344, in __init__
        self.make_preferences_effective()
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 1348, in make_preferences_effective
        self.dict = dictionary.Dict("en")
      File "/usr/lib/python3.7/site-packages/lios/dictionary.py", line 48, in __init__
        super(Dict,self).__init__(language)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 562, in __init__
        _EnchantObject.__init__(self)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 168, in __init__
        self._init_this()
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 569, in _init_this
        this = self._broker._request_dict_data(self.tag)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 310, in _request_dict_data
        self._raise_error(eStr % (tag,),DictNotFoundError)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 258, in _raise_error
        raise eclass(default)
    enchant.errors.DictNotFoundError: Dictionary for language 'en' could not be found

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,825
    Blog Entries
    15

    Default Re: How to install my favorite OCR app

    Quote Originally Posted by tux_peng View Post
    Thanks, my dependencies now read
    Code:
    python3, python3-sane, python3-speechd, tesseract-ocr, imagemagick, cuneiform, espeak, poppler-tools, python3-pyenchant,  aspell-en,
    Code:
     typelib-1_0-GstVideo-1_0
    I still get an error, so I might just not be able to run it
    Code:
    /usr/lib/python3.7/site-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk
    /usr/lib/python3.7/site-packages/lios/ui/gtk/print_dialog.py:23: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import PangoCairo
    /usr/lib/python3.7/site-packages/lios/cam.py:19: PyGIWarning: GstVideo was imported without specifying a version first. Use gi.require_version('GstVideo', '1.0') before import to ensure that the right version gets loaded.
      from gi.repository import GdkX11, GstVideo
    /usr/lib/python3.7/site-packages/lios/ui/gtk/terminal.py:21: PyGIWarning: Vte was imported without specifying a version first. Use gi.require_version('Vte', '2.91') before import to ensure that the right version gets loaded.
      from gi.repository import Gtk, GObject, Vte
    
    (lios:5002): Gtk-WARNING **: 15:03:44.917: Cannot connect attribute 'text' for cell renderer class 'lios+ui+gtk+tree_view+CellRendererToggle' since attribute does not exist
    Traceback (most recent call last):
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 1346, in make_preferences_effective
        self.dict = dictionary.Dict(dictionary.dictionary_language_dict[languages[self.preferences.language]])
      File "/usr/lib/python3.7/site-packages/lios/dictionary.py", line 48, in __init__
        super(Dict,self).__init__(language)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 562, in __init__
        _EnchantObject.__init__(self)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 168, in __init__
        self._init_this()
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 569, in _init_this
        this = self._broker._request_dict_data(self.tag)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 310, in _request_dict_data
        self._raise_error(eStr % (tag,),DictNotFoundError)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 258, in _raise_error
        raise eclass(default)
    enchant.errors.DictNotFoundError: Dictionary for language 'en' could not be found
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/bin/lios", line 8, in <module>
        linux_intelligent_ocr_solution()
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 344, in __init__
        self.make_preferences_effective()
      File "/usr/lib/python3.7/site-packages/lios/main.py", line 1348, in make_preferences_effective
        self.dict = dictionary.Dict("en")
      File "/usr/lib/python3.7/site-packages/lios/dictionary.py", line 48, in __init__
        super(Dict,self).__init__(language)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 562, in __init__
        _EnchantObject.__init__(self)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 168, in __init__
        self._init_this()
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 569, in _init_this
        this = self._broker._request_dict_data(self.tag)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 310, in _request_dict_data
        self._raise_error(eStr % (tag,),DictNotFoundError)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 258, in _raise_error
        raise eclass(default)
    enchant.errors.DictNotFoundError: Dictionary for language 'en' could not be found
    Hi
    You also need the Vte typelib.

    Yes it appears pyenchant is now unmaintained and doesn't work with python3.7....
    https://github.com/rfk/pyenchant

    Code:
    Python 3.7.2 (default, Dec 30 2018, 16:18:15) [GCC] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import enchant
    >>> print("The dict is", enchant.list_languages())
    The dict is ['fi']
    >>> d = enchant.Dict('en_US')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 562, in __init__
        _EnchantObject.__init__(self)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 168, in __init__
        self._init_this()
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 569, in _init_this
        this = self._broker._request_dict_data(self.tag)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 310, in _request_dict_data
        self._raise_error(eStr % (tag,),DictNotFoundError)
      File "/usr/lib/python3.7/site-packages/enchant/__init__.py", line 258, in _raise_error
        raise eclass(default)
    enchant.errors.DictNotFoundError: Dictionary for language 'en_US' could not be found
    I would suggest a bug report for the openSUSE build of python-enchant...
    https://build.opensuse.org/package/s...thon-pyenchant

    openSUSE:Submitting bug reports - openSUSE
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •