Unity command returns python error

Bug #1511157 reported by Tim Hitchins
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Unity
New
Low
Unassigned
unity (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When you run the command `unity --version` - in fact any `unity` command - it gives the following:

$ unity --version
Traceback (most recent call last):
  File "/usr/bin/unity", line 21 in <module>
    import glib
ImportError: No module named glib

I'm on Ubuntu 15.10

Unity is 7.3.2+15.10.20151016-0ubuntu1

I expected to see the version of unity (--version), or the help for the unity command (--help) - or for unity to restart (no args). Instead it gives the above error.

Tim Hitchins (timtjtim)
description: updated
Changed in unity (Ubuntu):
importance: Undecided → Low
Changed in unity:
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Erik Zoltan (erikzoltan) wrote :

I had problems with my system and reinstalled from a 15.10 CD to fix the problems. Now I can log into Ubuntu but Unity doesn't have a side menu or a top menu bar. Windows don't have window title bars and can't be resized. When I try to run unity command from the terminal, I get the following output.

~ $ unity --version
Traceback (most recent call last):
  File "/usr/bin/unity", line 21, in <module>
    import glib
ImportError: No module named glib
~ $

I assume this is related to the lack of a side bar and top menu bar.

Thanks,
Erik

Revision history for this message
Erik Zoltan (erikzoltan) wrote :

Update: I resolved my problems with the side panel and top menu bar, but I'm still getting the error message with the unity command. So I guess they're possibly not related.

Thanks,
Erik

Revision history for this message
Thomas Kupper (thomas-kupper) wrote :

While optimizing my today freshly installed Ubuntu 15.10 x86_64 for High-DPI I came across the same problem. Based on a AskUbuntu article (http://askubuntu.com/questions/695331/ubuntu-15-10-launcher-icons-not-locking) installing the package 'python-gobject-2' solved that problem for me.

In the article it says to install (all) python-gst* packages. Since after removing them unity still worked it had to be one of the dependencies. In the end it came down to the above mentioned package.

Summary: installing 'python-gobject-2' package solved it for me.

Cheers
Thomas

Revision history for this message
Vladimir Rutsky (rutsky-vladimir) wrote :

I believe unity package must depend (directly or indirectly) on python-gobject-2.

My colleague encountered this bug and it's symptoms were: after login only desktop with the wallpaper is shown.
You can right click on desktop and, for example, create "New Directory", or start terminal from the context menu,
but no window decorations are shown.

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.