No module named gi

Bug #1566056 reported by Andrew
This bug report is a duplicate of:  Bug #1573567: Can't open gufw in Ubuntu 16.04. Edit Remove
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Gufw
New
Critical
costales

Bug Description

Gufw crashes when attempting to start it on Ubuntu 16.04 Beta 2. Here is the traceback information:

Traceback (most recent call last):
  File "/usr/share/gufw/gufw/gufw.py", line 21, in <module>
    from view.gufw import Gufw
  File "/usr/share/gufw/gufw/view/gufw.py", line 19, in <module>
    import gi
ImportError: No module named gi

Steps to reproduce:
1. sudo apt install gufw
2. gufw
3. Type in password

Revision history for this message
Andrew (andrewregan) wrote :

After a quick search, I found that Gufw is missing a python dependency. It appears that the python-gi package needs to be added as a dependency.

Steps to fix:
1. sudo apt install python-gi
2. gufw
3. Type in password

costales (costales)
Changed in gui-ufw:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → costales (costales)
Revision history for this message
costales (costales) wrote :

Hi :) I just installed the Xenial beta2 and everything is working fine :O

Changed in gui-ufw:
status: In Progress → New
status: New → Invalid
status: Invalid → New
Revision history for this message
Andrew (andrewregan) wrote :

I just re-tested gufw in a Xenial Beta2 VM, and the bug still persists. A screenshot is attached.

Steps to reproduce:
1. Download Ubuntu 16.04 Beta 2 from torrent
  http://releases.ubuntu.com/16.04/

2. Install Ubuntu 16.04 Beta 2 in a virtual machine

3. Upgrade the system with the following commands
  sudo apt update
  sudo apt upgrade

4. Install gufw using apt
  sudo apt install gufw

5. Attempt to run gufw
  gufw

I uploaded a demo of this bug on YouTube:
https://www.youtube.com/watch?v=cscL5NbT0V8

Revision history for this message
costales (costales) wrote : Re: [Bug 1566056] Re: No mudule named gi

I tested that today too and it worked :P Let's give a time, maybe is a beta bug.
--
Sent using Dekko from my Ubuntu device

costales (costales)
summary: - No mudule named gi
+ No module named gi
Revision history for this message
Aleksey Kabanov (ak099) wrote :

Gufw begins to work again after installation of python-gi:
sudo apt install python-gi

Revision history for this message
mohamed (habi30002009) wrote :

hi
i already have python-gi installed but gufw still does not work same error "No module named 'gi'"
ubuntu 17.10

Revision history for this message
stefano (cavina) wrote :
Download full text (4.8 KiB)

xteto@xteto-ThinkPad-T470:~$ sudo apt install python-gi
[sudo] password di xtetox:
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
python-gi is already the newest version (3.24.1-2build1).
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
xteto@xteto-ThinkPad-T470:~$ gufw
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Impossibile connettersi: Connection refused

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:9809): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:9809): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (displ...

Read more...

Revision history for this message
stefano (cavina) wrote :

hi happen to me too just upgrade to ubuntu 17.10 now

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.