Ocrfeeder has been broken by some recent update in python packages

Trying to run it results in

Traceback (most recent call last):
  File "/usr/bin/ocrfeeder", line 36, in <module>
    studio = Studio()
  File "/usr/lib/python3.10/site-packages/ocrfeeder/studio/studioBuilder.py", line 147, in __init__
    add_engines_dialog = widgetPresenter.SystemEnginesDialog(engines)
TypeError: SystemEnginesDialog.__init__() missing 1 required positional argument: 'engines'

The package probably needs an update.

Hi @callegar,

I think that should be done here:

I can’t reproduce that, it works fine for me.

0.8.5 is the latest version.

Are you sure? :wink:

❯ pacman -Si ocrfeeder | grep Packager
Packager        : Antonio Rojas <arojas@archlinux.org>

Well, I only checked ans found it in the repositories. And I said I think, because, no, I wasn’t. Not really.

I apologize for the noise, then!

As a matter of fact there is no official ocrfeeder release newer than the one in manjaro right now (as it was observed), but a simple patch can fix the issue.

In /usr/lib/python3.10/site-packages/ocrfeeder/studio/studioBuilder.py change add_engines_dialog = widgetPresenter.SystemEnginesDialog(engines) into add_engines_dialog = widgetPresenter.SystemEnginesDialog(self.main_window, engines)

I understand that manjaro and arch do not patch downstream. Some users might find this info useful, though.

There is no issue–at least for me on the unstable branch. Maybe you should switch branches and see if that makes any difference. If not, then it’s a local issue on your machine. Maybe you’re mixing system and user Python packages.

Weird, because the bug is mentioned on the very ocrfeeder tracker… And in fact the same patch is proposed there too! See TypeError: __init__() missing 1 required positional argument: 'engines' (#83) · Issues · GNOME / ocrfeeder · GitLab

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.