I tried updating App Grid but got an error, I've uninstalled it but when I reinstall it I still get an error and it won't install

Bug #1609747 reported by Terry Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
App Grid
Fix Released
Undecided
Unassigned

Bug Description

This is the result when I try to install App Grid. I hope this is the correct information as I'm not sure what you need.

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed
  appgrid
0 to upgrade, 1 to newly install, 0 to remove and 22 not to upgrade.
Need to get 0 B/79.3 kB of archives.
After this operation, 433 kB of additional disk space will be used.
Selecting previously unselected package appgrid.
(Reading database ... 390416 files and directories currently installed.)
Preparing to unpack .../archives/appgrid_0.277_all.deb ...
Unpacking appgrid (0.277) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Setting up appgrid (0.277) ...
Traceback (most recent call last):
  File "/usr/share/appgrid/appdata.py", line 163, in <module>
    rebuild_db()
  File "/usr/share/appgrid/appdata.py", line 31, in rebuild_db
    from appdata.helpers import request
  File "/usr/share/appgrid/appdata/helpers.py", line 9, in <module>
    import gi
ImportError: No module named 'gi'
dpkg: error processing package appgrid (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 appgrid
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
pgg (pgg) wrote :

Hi Terry,

Thanks for reporting this issue. This is indeed the spot where things are going wrong. I have a little idea what might be causing this, so would you perhaps be able to run the following commands in a terminal window and paste the outputs here to help verify this?

apt-cache policy python3-gi
python3 -c "import gi"
/usr/bin/python3 -c "import gi"
which python3

Thanks for your help!

Revision history for this message
Terry Hunt (rustyknight07) wrote :

I remember noticing the following when I do "sudo apt-get update" since I upgraded to 16.04, presumably this is part of the problem:

Traceback (most recent call last):
  File "/usr/share/appgrid/appdata.py", line 163, in <module>
    rebuild_db()
  File "/usr/share/appgrid/appdata.py", line 31, in rebuild_db
    from appdata.helpers import request
  File "/usr/share/appgrid/appdata/helpers.py", line 9, in <module>
    import gi
ImportError: No module named 'gi'

The output from the commands you gave is below:

python3-gi:
  Installed: 3.20.0-0ubuntu1
  Candidate: 3.20.0-0ubuntu1
  Version table:
 *** 3.20.0-0ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'gi'

/usr/local/bin/python3

Revision history for this message
pgg (pgg) wrote :

Thanks for that! It looks like your python3 command runs a local version of python3 (/usr/local/bin/python3) instead of the system install of python3 (/usr/bin/python3). The local version of python3 isn't picking up the modules which are installed on a system level and hence crashes when App Grid tries to import them. By forcing App Grid to use the system python3 rather than a potentially different version of python3 this should be resolved. I'll fix this in the codebase and release a new version of App Grid on Monday. Thanks again for your help.

Revision history for this message
Terry Hunt (rustyknight07) wrote :

Thanks for you help too.

pgg (pgg)
Changed in appgrid:
status: New → Fix Committed
pgg (pgg)
Changed in appgrid:
status: Fix Committed → Fix Released
Revision history for this message
Terry Hunt (rustyknight07) wrote :

App Grid is working again - thanks for your help

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.