[Bug 2002865] Re: Othman does not run at all on Ubuntu 22.04

Jeremy Bicha 2002865 at bugs.launchpad.net
Fri Jan 20 13:13:40 UTC 2023


** Description changed:

+ Impact
+ ------
+ Othman won't run in Ubuntu 22.04 LTS because it tries to import Gtk with gobject-introspection without specifying a version. Ubuntu Desktop 22.04 LTS has both gir1.2-gtk-3.0 and gir1.2-gtk-4.0 installed by default. This causes Othman to try to load GTK4 but it is not compatible with GTK4.
+ 
+ Test Case
+ ---------
+ Install and run othman as demonstrated in the original bug report. The app should run normally.
+ 
+ What Could Go Wrong
+ -------------------
+ The app already does not work for most users. This is a trivial and correct fix.
+ 
+ Original Bug Report
+ -------------------
  Hello.
  
  Othman, the open source Quran browser, does not run at all in Ubuntu
  22.04.
  
  After installing it with:
  $ sudo apt install othman
  
  If you try to run the program, you will get the following error:
  
- 
  mhsabbagh at ubuntu2204:~$ othman-browser
  /usr/lib/python3/dist-packages/othman/gtkUi.py:23: 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, Gdk, GLib, Pango, GdkPixbuf
+   from gi.repository import Gtk, Gdk, GLib, Pango, GdkPixbuf
  Traceback (most recent call last):
-   File "/usr/bin/othman-browser", line 4, in <module>
-     main()
-   File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 425, in main
-     w = othmanUi()
-   File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 115, in __init__
-     self.connect("delete_event", self.quit)
+   File "/usr/bin/othman-browser", line 4, in <module>
+     main()
+   File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 425, in main
+     w = othmanUi()
+   File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 115, in __init__
+     self.connect("delete_event", self.quit)
  TypeError: <gtkUi.othmanUi object at 0x7f8ab7dd6c80 (othman+gtkUi+othmanUi at 0x55a4070ee2b0)>: unknown signal name: delete_event
  
- 
- However, this error seems to be in Ubuntu 22.04 only; I installed Debian 11 (which ships the exact same version of Othman, 0.6.0-2), and it runs without problems (image attached).
+ However, this error seems to be in Ubuntu 22.04 only; I installed Debian
+ 11 (which ships the exact same version of Othman, 0.6.0-2), and it runs
+ without problems (image attached).
  
  I have found that if we just add these two lines to
  /usr/lib/python3/dist-packages/othman/gtkUi.py file (before the "from
  gi.repository import Gtk..." line), then the program will run
  successfully:
  
  import gi
  gi.require_version('Gtk', '3.0')
  
  So it sounds like the issue is that since the Gtk version required isn't
  specified, it is trying to import Gtk 4.0 (which the program isn't
  designed to work with).
  
  Can anyone create a patch file with these two lines and update it in the
  Ubuntu package?
  
  Thanks.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2002865

Title:
  Othman does not run at all on Ubuntu 22.04

Status in othman package in Ubuntu:
  Fix Released
Status in othman source package in Jammy:
  Triaged
Status in othman source package in Kinetic:
  Triaged

Bug description:
  Impact
  ------
  Othman won't run in Ubuntu 22.04 LTS because it tries to import Gtk with gobject-introspection without specifying a version. Ubuntu Desktop 22.04 LTS has both gir1.2-gtk-3.0 and gir1.2-gtk-4.0 installed by default. This causes Othman to try to load GTK4 but it is not compatible with GTK4.

  Test Case
  ---------
  Install and run othman as demonstrated in the original bug report. The app should run normally.

  What Could Go Wrong
  -------------------
  The app already does not work for most users. This is a trivial and correct fix.

  Original Bug Report
  -------------------
  Hello.

  Othman, the open source Quran browser, does not run at all in Ubuntu
  22.04.

  After installing it with:
  $ sudo apt install othman

  If you try to run the program, you will get the following error:

  mhsabbagh at ubuntu2204:~$ othman-browser
  /usr/lib/python3/dist-packages/othman/gtkUi.py:23: 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, Gdk, GLib, Pango, GdkPixbuf
  Traceback (most recent call last):
    File "/usr/bin/othman-browser", line 4, in <module>
      main()
    File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 425, in main
      w = othmanUi()
    File "/usr/lib/python3/dist-packages/othman/gtkUi.py", line 115, in __init__
      self.connect("delete_event", self.quit)
  TypeError: <gtkUi.othmanUi object at 0x7f8ab7dd6c80 (othman+gtkUi+othmanUi at 0x55a4070ee2b0)>: unknown signal name: delete_event

  However, this error seems to be in Ubuntu 22.04 only; I installed
  Debian 11 (which ships the exact same version of Othman, 0.6.0-2), and
  it runs without problems (image attached).

  I have found that if we just add these two lines to
  /usr/lib/python3/dist-packages/othman/gtkUi.py file (before the "from
  gi.repository import Gtk..." line), then the program will run
  successfully:

  import gi
  gi.require_version('Gtk', '3.0')

  So it sounds like the issue is that since the Gtk version required
  isn't specified, it is trying to import Gtk 4.0 (which the program
  isn't designed to work with).

  Can anyone create a patch file with these two lines and update it in
  the Ubuntu package?

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/othman/+bug/2002865/+subscriptions




More information about the Ubuntu-sponsors mailing list