FS#29782 - [python2-gobject2] ImportError prevents offlineimap from starting

Attached to Project: Arch Linux
Opened by voltaic (voltaic) - Sunday, 06 May 2012, 14:32 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 22:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

After a full system upgrade (and reboot) yesterday I noticed that offlineimap will no longer run. Please see the attached logfile for packages upgraded yesterday. Note that python2 (2.7.3-1 -> 2.7.3-2), python2-distribute (0.6.25-1 -> 0.6.26-1), and offlineimap (6.5.2.1-1 -> 6.5.3.1-1) were upgraded.

When I execute offlineimap I get the following message from Python:

** (process:12485): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in facgs'

** (process:12485): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in facgs'

** (process:12485): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in facts'
Traceback (most recent call last):
File "/usr/bin/offlineimap", line 20, in <module>
from offlineimap import OfflineImap
ImportError: cannot import name OfflineImap

Additional info:
* offlineimap 6.5.3.1-1
* python2 2.7.3-2
* config and/or log files etc.

Steps to reproduce:
1) execute offlineimap without any command line options
2) ImportError prevents offlineimap from starting

Please let me know if I left out any relevant information. Thanks.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Sunday, 06 May 2012, 22:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  pygobject2-2.28.6-6 in [extra]
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 15:11 GMT
Please:
- Show me the output of `pactree -u offlineimap | xargs pacman -Qv`.
- Try with /usr/share/offlineimap/offlineimap.conf.minimal as offlineimaprc.
- See if you have other python2 apps affected on your system (is python2 itself OK?).
Comment by voltaic (voltaic) - Sunday, 06 May 2012, 18:34 GMT
As per your request:
- The output of pactree is attached.
- Using /usr/share/offlineimap/offlineimap.conf.minimal as offlineimaprc produces the same outcome (ImportError).
- python2 itself seems to be OK, and I am able to run other python2 applications without any problems (tried iotop and veusz).

I am happy to provide more detail if needed.
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 18:47 GMT
How come your pactree output does not show that you have offlineimap installed? What does `pacman -Qi offlineimap` show?
Comment by voltaic (voltaic) - Sunday, 06 May 2012, 19:02 GMT
I'm sorry, I mistakenly attached the output of `pactree -u python2`. The correct output is attached here.

Offlineimap is of course installed. I can see all of its files in the python2.7 site-packages directory.

pacman -Qi offlineimap:
Name : offlineimap
Version : 6.5.3.1-1
URL : http://offlineimap.org/
Licenses : GPL
Groups : None
Provides : None
Depends On : python2
Optional Deps : None
Required By : None
Conflicts With : None
Replaces : None
Installed Size : 944.00 KiB
Packager : Gaetan Bisson <bisson at archlinux.org>
Architecture : any
Build Date : Mon 30 Apr 2012 04:50:40 AM EDT
Install Date : Sun 06 May 2012 10:01:03 AM EDT
Install Reason : Explicitly installed
Install Script : No
Description : Synchronizes emails between two repositories
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 19:41 GMT
I can reproduce your problem if I open a python2 prompt and type "import gtk", so I believe the bug is not in offlineimap but in some python/gnome/glib thingy.
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 19:49 GMT
Alright, I don't know why I'm not affected by it, but this is probably your issue: https://bugs.launchpad.net/ubuntu/+source/pygobject-2/+bug/918607

Here's the tentative patch for python2-gobject2: http://patch-tracker.debian.org/patch/series/dl/pygobject-2/2.28.6-10/00git_gio_flag_type.patch
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 19:52 GMT
Jan, Allan, would it make sense to patch python2-gobject2 with http://patch-tracker.debian.org/patch/series/dl/pygobject-2/2.28.6-10/00git_gio_flag_type.patch ?
Comment by voltaic (voltaic) - Sunday, 06 May 2012, 20:53 GMT
For what it's worth, I cannot reproduce the problem on a different Arch installation. Both systems are up to date as of today. The unaffected system does not have python2-gobject2 installed. However, I could not reproduce the error even after installing python2-gobject2.
Comment by Allan McRae (Allan) - Sunday, 06 May 2012, 21:00 GMT
The patch probably makes sense even though it does not appear to be the cause of this issue
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 21:10 GMT
voltaic: But the affected machine does have python2-gobject2 installed, right?

On this machine, could install the pygobject2-devel, python2-gobject2, and python-gobject2 packages from http://arch.vesath.org/all/ and see if that helps?
Comment by voltaic (voltaic) - Sunday, 06 May 2012, 22:01 GMT
Gaetan: Yes, the affected machine has python2-gobject2 installed.

I installed the three gobject2 packages (pygobject2-devel-2.28.6-6, python-gobject2-2.28.6-6, python2-gobject2-2.28.6-6) from your repository. The error messages disappeared and offlineimap is executing correctly. However, now I'm hitting  FS#27218 . See here: https://github.com/spaetz/offlineimap/issues/1 . I can't tell if this is related to the current discussion or not.

For your notice, there is also another pygobject2 patch mentioned on Ubuntu Launchpad. Please see this revision: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/pygobject-2/precise/revision/7 . The patch is titled debian/patches/00git_fix_qdata_warning.patch.
Comment by voltaic (voltaic) - Sunday, 06 May 2012, 22:17 GMT
Sorry about the noise, but  FS#27218  I mentioned appears to stem from a configuration error. There are a lot of bug reports on this, however, all of them come down to a misconfigured offlineimaprc. For those affected, apparently the name translation option "nametrans" in offlineimap now requires a reverse nametrans rule. The documentation explains this nicely: http://docs.offlineimap.org/en/latest/nametrans.html#reverse-nametrans .

For some reason, offlineimap 6.5.2 did not give me any trouble, but 6.5.3 requires reverse nametrans because it insists on creating folders in the remote repository. If the name translation rules are not defined for the reverse case (local -> remote), then offlineimap attempts to create a bunch of directories under the root directory of the remote repository and gets denied access.

I will try to notify those users who complained about the nametrans problem.
Comment by Gaetan Bisson (vesath) - Sunday, 06 May 2012, 22:43 GMT
Thanks, I'll push the patched package to [extra].

Loading...