OpenLP not working on Linux Mint 21 (=Ubuntu 22.04) ?

Hi OpenLP users,

Openlp is running fine on Linux Mint 20.3, a few weeks ago Linux Mint 21 came out, based on Ubuntu 22.04.

I installed OpenLP from the LM21 repository. When the main window tries to start, a fatal error message shows up and the program crashes.

System: fresh installed Linux Mint 21 (Ubuntu 22.04)

OpenLP Version: 2.4.6

Error message as follows:

Traceback:

File "/usr/share/openlp/openlp/core/ui/mainwindow.py", line 823 in paintEvent

 self.preview_controller.preview_size_changed()

File "/usr/share/openlp/openlp/core/ui/slidecontroller.py" line 619, in preview_size_changed

 max_height = self.preview_frame_height() - self.grid.contentsMargins().top() * 2

AttributError: 'PreviewController' object has no attribute 'grid'

Here a part of the screen:



Any ideas ? A library conflict ? Conflict with Python3 ?

Comments

  • Hi,

    OpenLP 2.4.6 is very old, and it is not surprising that you see issues like this. I recommend trying out 2.9.5, which is not far off from version 3.0. Check the blog post on the release.

  • Thanx for the hint. I tried version 2.9.5, it generates a lot of error messages in the log file ("range exceeded") and does not allow to change language. It looks like an unfinished beta version.

    May be 2.4.6 is old, but this is the version which is presented in the LM repositories and it is running very stable with Linux Mint 20.x or Ubuntu 20.04.

  • I'm getting the same error and another post sugests to downgrade the system, but that is not practical at all. It seems to be a python incompatibility, so hopefully version 3 comes out soon and we can move on.

  • I'm getting the same error on Pop!-OS v22.04. The version of OpenLP that apt installs is 2.4.6.

    I manually downloaded & installed OpenLP v2.9.5. Seems to work just fine.

  • I'll recommend this: You should install python3-distutils (Just run "sudo apt install python3-distutils" in a terminal.)

  • edited October 2022

    I've just upgraded KDE neon to the Ubuntu 22.04 based version. For me 2.9.5 starts, but has all sorts of UI issues where things just aren't rendered. I also just tried 2.4.6 from the Ubuntu repository and that fails with the same error you are seeing. Right now my guess would be it's something related to Qt, but that's just a hunch.

    Edit:

    Just did some testing on a Debian 11 VM (with KDE), there the OpenLP version from the repository does work. On a clean KDE Neon install it first needs python3-distutils installed (so there's a missing dependancy) but then still fails with the error shown above.

    Edit 2:

    This is caused by Python 3.10, it works correctly with Python 3.9. Python in no longer automatically converting floats to int when calling native function which happens a when invoking Qt. To fix this would either need an earlier Python version or changes to the code and an updated package. I managed to get it started by manually editing /usr/share/openlp/openlp/core/ui/slidecontroller.py, but I guess it is very likely that the same issue will pop up in more places once you actually start doing stuff.

    The sensible options I can see:

    • Use a distro with an older Python, e.g. Debian.
    • Manually install Python 3.9 and all dependencies.
    • Move to version 2.9.5.
Sign In or Register to comment.