FS#42243 - [ibus-googlepinyin] Dependency missing

Attached to Project: Community Packages
Opened by Chih-Hsuan Yen (yan12125) - Saturday, 04 October 2014, 15:02 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 12 October 2014, 02:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When I try to use Google Pinyin IME under the IBus framework, python error occues: "ImportError: No module named gobject"

Additional info:
ibus 1.5.9-1
ibus-googlepinyin 0.1.2-4
libgooglepinyin 0.1.2-2
python 3.4.1-1
python2 2.7.8-2

Result of `pip list`
cssselect (0.9.1)
djangorestframework (2.3.13)
docutils (0.12)
flake8 (2.2.3)
Flask (0.10.1)
itsdangerous (0.24)
Jinja2 (2.7.3)
lxml (3.4.0)
MarkupSafe (0.23)
mccabe (0.2.1)
namcap (3.2.5)
pep8 (1.5.7)
pip (1.5.6)
prettytable (0.7.2)
psutil (1.0.1)
pyalpm (0.6.2)
pyelftools (0.21)
pyflakes (0.8.1)
pygobject (3.12.2)
pyquery (1.2.9)
pyxdg (0.25)
requests (2.4.1)
setuptools (6.0.2)
team (1.0)
thrift (1.0.0-dev)
Werkzeug (0.9.6)
you-get (0.3.30)
youtube-dl (2014.10.02)

Result of `pip2 list`
Beaker (1.6.4)
bypy (1.0)
bzr (2.6.0)
colorama (0.3.2)
docutils (0.12)
Editra (0.7.20)
iotop (0.6)
Jinja2 (2.7.3)
logcat-color (0.6.0)
Mako (1.0.0)
MarkupSafe (0.23)
mercurial (3.1.1)
mimms (3.2)
Pillow (2.5.3)
pip (1.5.6)
pyflakes (0.8.1)
Pygments (1.6)
pysane (2.0)
python-musicbrainz (2.1.5)
requests (2.4.1)
scons (2.3.4)
setuptools (6.0.2)
Sphinx (1.2.3)
team (1.0)
ufw (0.33)
vboxapi (1.0)
winpdb (1.4.8)
wsgiref (0.1.2)
wxPython (3.0.1.1)
wxPython-common (3.0.1.1)
zenmap (6.47)

Steps to reproduce:
1. Install ibus-googlepinyin
2. Kill all ibus-daemon processes
3. Run `ibus-daemon -v` from the terminal
4. Switch to Google Pinyin IME
Error messages from the terminal:

(ibus-ui-gtk3:29935): IBUS-WARNING **: ibus_bus_call_sync: org.freedesktop.DBus.Properties.Get: GDBus.Error:org.freedesktop.DBus.Error.Failed: No global engine.
Traceback (most recent call last):
File "/usr/share/ibus-googlepinyin/main.py", line 25, in <module>
import ibus
File "/usr/lib/python2.7/site-packages/ibus/__init__.py", line 27, in <module>
from object import *
File "/usr/lib/python2.7/site-packages/ibus/object.py", line 27, in <module>
import gobject
ImportError: No module named gobject

(ibus-ui-gtk3:29935): IBUS-WARNING **: ibus_bus_call_sync: org.freedesktop.IBus.SetGlobalEngine: GDBus.Error:org.freedesktop.DBus.Error.Failed: Set global engine failed.

(ibus-ui-gtk3:29935): IBUS-WARNING **: panel.vala:691: Switch engine to googlepinyin failed.

This task depends upon

Closed by  Felix Yan (felixonmars)
Sunday, 12 October 2014, 02:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  ibus-googlepinyin 0.1.2-5
ibus 1.5.9-3
ibus-sunpinyin 2.0.3.20130307-2
Comment by Felix Yan (felixonmars) - Thursday, 09 October 2014, 04:38 GMT
From the traceback it looks like a dependency of ibus itself.

$ pkgfile /usr/lib/python2.7/site-packages/ibus/object.py
extra/ibus
Comment by Chih-Hsuan Yen (yan12125) - Friday, 10 October 2014, 11:27 GMT
Well, I finally start ibus-googlepinyin up. First I install python2-dbus, and the error messages become:

Traceback (most recent call last):
File "/usr/share/ibus-googlepinyin/main.py", line 27, in <module>
import factory
File "/usr/share/ibus-googlepinyin/factory.py", line 22, in <module>
import engine
File "/usr/share/ibus-googlepinyin/engine.py", line 26, in <module>
import pango
ImportError: No module named pango

It's ibus-googlepinyin's duty this time :)

I install pygtk and everything works. Consider adding pygtk as a dependency?
Comment by Felix Yan (felixonmars) - Friday, 10 October 2014, 13:04 GMT
Both added :)
Comment by Chih-Hsuan Yen (yan12125) - Friday, 10 October 2014, 13:54 GMT
Well, there's something tricky. Several files in ibus import gobject, and /usr/share/ibus-googlepinyin/engine.py imports pango. pango is in pygtk, and gobject is in python2-gobject2. Additionally, pygtk depends on pygobject, which is provided by python2-gobject2.

At least now everything works.
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 11 October 2014, 04:29 GMT
ibus-sunpinyin has similar problems. When I select "Preference" from the tray icon, the following error occurs:

Traceback (most recent call last):
File "/usr/share//ibus-sunpinyin/setup/main.py", line 40, in <module>
import gtk

Seems ibus-sunpinyin uses python2 because of something like "print >> sys.stderr, message" in /usr/share/ibus-sunpinyin/setup/main.py

Again, I installed pygtk and python2-dbus to solve another error like this:

Traceback (most recent call last):
File "/usr/share//ibus-sunpinyin/setup/main.py", line 41, in <module>
import ibus
File "/usr/lib/python2.7/site-packages/ibus/__init__.py", line 28, in <module>
from attribute import *
File "/usr/lib/python2.7/site-packages/ibus/attribute.py", line 40, in <module>
import dbus
ImportError: No module named dbus

Is it necessary to open a new task for ibus-sunpinyin?
Comment by Felix Yan (felixonmars) - Saturday, 11 October 2014, 06:39 GMT
OK, so I'm adding python2-gobject2 and python2-dbus as dependencies of ibus, and pygtk to ibus-sunpinyin. Lemme know if there are more problems :)

Loading...