Bug 6597 - Gramps fails to run with error "ImportError: No module named _bsddb"
Summary: Gramps fails to run with error "ImportError: No module named _bsddb"
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure, MGA2-64-OK, MGA2-32-OK
Keywords: PATCH, UPSTREAM, validated_update
Depends on:
Blocks: 2729
  Show dependency treegraph
 
Reported: 2012-06-27 12:38 CEST by richard west
Modified: 2012-08-18 13:23 CEST (History)
10 users (show)

See Also:
Source RPM: gramps-3.3.1-1.mga2.src.rpm
CVE:
Status comment:


Attachments

Description richard west 2012-06-27 12:38:11 CEST
Description of problem:

Running Mageia2 64bit fully updated.

Gramps will not run. This is what I get in Konsole

--------------------------------------
[richard@localhost ~]$ gramps 

** (process:3770): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:3770): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:3770): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Gtk-Message: Failed to load module "canberra-gtk-module"
2153: ERROR: gramps.py: line 142: Unhandled exception
Traceback (most recent call last):
  File "/usr/share/gramps/gui/grampsgui.py", line 271, in __startgramps
    from GrampsLogger import RotateHandler, GtkHandler
  File "/usr/share/gramps/GrampsLogger/__init__.py", line 45, in <module>
    from _GtkHandler import GtkHandler
  File "/usr/share/gramps/GrampsLogger/_GtkHandler.py", line 4, in <module>
    from _ErrorView import ErrorView
  File "/usr/share/gramps/GrampsLogger/_ErrorView.py", line 15, in <module>
    from _ErrorReportAssistant import ErrorReportAssistant
  File "/usr/share/gramps/GrampsLogger/_ErrorReportAssistant.py", line 14, in <module>
    import bsddb
  File "/usr/lib64/python2.7/bsddb/__init__.py", line 67, in <module>
    import _bsddb
ImportError: No module named _bsddb
-----------------------------------------


Output from gramps -v


-------------------------------------------
[richard@localhost ~]$ gramps  -v

** (process:4108): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:4108): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:4108): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Gtk-Message: Failed to load module "canberra-gtk-module"
Gramps Settings:
----------------
 python    : 2.7.3
 gramps    : 3.3.1-1
 gtk++     : 2.24.10
 pygtk     : 2.24.0
 gobject   : 2.28.6
 Not using bsddb3
 bsddb     : not found
 bsddb.db  : not found
 cairo     : 1.10.0
 osmgpsmap : 0.7.3
 pyexiv2   : 0.3.0
 o.s.      : Linux
 kernel    : 3.3.6-desktop-2.mga2

Environment settings:
---------------------
 LANG      : en_GB.UTF-8
 LANGUAGE  : en_GB.UTF-8
 GRAMPSI18N: not set
 GRAMPSDIR : /usr/share/gramps
 PYTHONPATH:
    /usr/share/gramps
    /usr/lib/python27.zip
    /usr/lib64/python2.7
    /usr/lib64/python2.7/plat-linux2
    /usr/lib64/python2.7/lib-tk
    /usr/lib64/python2.7/lib-old
    /usr/lib64/python2.7/lib-dynload
    /usr/lib64/python2.7/site-packages
    /usr/lib64/python2.7/site-packages/PIL
    /usr/lib64/gimp/2.0/python
    /usr/lib64/gimp/2.0/plug-ins
    /usr/lib64/python2.7/site-packages/gst-0.10
    /usr/lib64/python2.7/site-packages/gtk-2.0
    /usr/lib/python2.7/site-packages

Non-python dependencies:
------------------------
 Graphviz  : dot - graphviz version 2.28.0 (20111228.1610)
 Ghostscr. : 9.05

System PATH env variable:
-------------------------
     /usr/bin
     /bin
     /usr/local/bin
     /usr/X11R6/bin/
     /usr/games
     /usr/lib64/qt4/bin
     /home/richard/bin

--------------------------

Version-Release number of selected component (if applicable):

gramps 3.3.1-1.mga2


How reproducible: 

Every time I try to run gramps

Steps to Reproduce:
1.
2.
3.
Manuel Hiebel 2012-07-21 12:57:36 CEST

Assignee: bugsquad => doktor5000
Severity: critical => major

Comment 1 Gary Montalbine 2012-07-30 01:58:42 CEST
Gramps does not work for me either. I am using 32 bit in Mageia2. Never had any trouble before.

CC: (none) => gmontalbine

Marc Maurer 2012-07-30 08:52:35 CEST

CC: (none) => marc.maurer

Comment 2 Marc Maurer 2012-07-31 10:44:38 CEST
I have the same problem :

[marc@erato ~]$ python /usr/share/gramps/gramps.py

** (process:5614): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:5614): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:5614): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
1396: ERROR: gramps.py: line 142: Unhandled exception
Traceback (most recent call last):
File "/usr/share/gramps/gui/grampsgui.py", line 271, in __startgramps
from GrampsLogger import RotateHandler, GtkHandler
File "/usr/share/gramps/GrampsLogger/__init__.py", line 45, in <module>
from _GtkHandler import GtkHandler
File "/usr/share/gramps/GrampsLogger/_GtkHandler.py", line 4, in <module>
from _ErrorView import ErrorView
File "/usr/share/gramps/GrampsLogger/_ErrorView.py", line 15, in <module>
from _ErrorReportAssistant import ErrorReportAssistant
File "/usr/share/gramps/GrampsLogger/_ErrorReportAssistant.py", line 14, in <module>
import bsddb
File "/usr/lib64/python2.7/bsddb/__init__.py", line 67, in <module>
import _bsddb
ImportError: No module named _bsddb
Comment 3 Marc Maurer 2012-07-31 10:46:16 CEST
I forgot : I use Mageia 2 64 bits
Marja Van Waes 2012-08-01 14:21:22 CEST

Blocks: (none) => 2729

Comment 5 Marc Maurer 2012-08-02 08:38:46 CEST
Hi,
On the french Mageia forum (MLO) :

http://www.mageialinux-online.org/forum/topic-13202-1+gramps.php
Manuel Hiebel 2012-08-02 12:25:00 CEST

Keywords: (none) => PATCH, UPSTREAM

Comment 6 Florian Hubold 2012-08-04 19:29:29 CEST
Seems a file got lost between last python updates:

This is python version from core/release, this should make Gramps work:
[doktor5000@Mageia2 ~]$ urpmq -l python-2.7.3-2.mga2 | grep bsddb.so
/usr/lib64/python2.7/lib-dynload/_bsddb.so


This is the python version from core/updates where formerly contained file is missing, gramps will fail with that:

$ urpmq -l python-2.7.3-2.2.mga2 | grep bsddb.so

Copying the file from the older package into /usr/lib64/python2.7/lib-dynload/ makes gramps work.

Assigning to current python maintainer.

CC: (none) => doktor5000
Assignee: doktor5000 => oliver.bgr

Comment 7 Marc Maurer 2012-08-04 22:01:01 CEST
Hi,
I have copying the file _bsddb.so into /usr/lib64/python2.7/lib-dynload/ and Gramps works but my family tree can't load !

-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- process-private: unable to find environment'
Comment 8 Florian Hubold 2012-08-05 10:50:00 CEST
This was only meant as part of a workaround, and needs to be properly fixed, hence the python maintainer has to take a look the bsddb problem, then i can try to fix gramps itself, if there are still outstanding problems.
Comment 9 Marc Maurer 2012-08-05 11:04:45 CEST
Hi,
A bug for python was created ?
Comment 10 Oliver Burger 2012-08-06 18:28:06 CEST
I just submitted a new python package to core/updates_testing.

The problem was accidentally switching from db4.8 to db5.1 while fixing some security issues.
Please try this new package and report back.
Comment 11 Inga Svensson 2012-08-06 20:20:24 CEST
I have the same problem.

What is the name of your updated package ? libpython2.7 - 2.7.3-2.1.mga2, i586, Core 32bit Updates Testing (distrib35), whose size is 1591 Kb ?

CC: (none) => svensson.inga

Comment 12 Oliver Burger 2012-08-06 20:41:06 CEST
It's several packages, all with the version and release 2.7.3-2.3.mga2

Here's the list:
- lib64python2.7
- lib64python-devel
- python
- python-debug
- python-docs
- tkinter
- tkinter-apps
Comment 13 richard west 2012-08-06 22:14:05 CEST
Todays updates from testing seem to have done the trick. Gramps fires up and seems to work OK now.

Thanks to all concerned.
Comment 14 Gary Montalbine 2012-08-07 00:13:37 CEST
I am using 32 bit. Where can I download the update packages? I tried core update testing in software management. Python was not available.
Comment 15 Olivier Delaune 2012-08-07 14:13:06 CEST
Testing on Mageia 2 64-bits. The new python packages fix the gramps problem. I do not have "ImportError: No module named _bsddb" problem anymore. Thanks.

CC: (none) => olivier.delaune

Comment 16 Oliver Burger 2012-08-07 14:28:32 CEST
@Gary: They should be. Perhaps your mirror did not sync yet.

@Richard @Olivier: Thanks for testing, any other comments?
Comment 17 richard west 2012-08-07 14:36:17 CEST
(In reply to comment #16)
> @Gary: They should be. Perhaps your mirror did not sync yet.
> 
> @Richard @Olivier: Thanks for testing, any other comments?

I haven't thoroughly tested but Gramps starts and runs OK. I was able to import a GED file and display the tree so It seems OK.
Comment 18 Gary Montalbine 2012-08-07 14:56:26 CEST
I think the problem is that software management does not add updates. I had this problem before and I think there is a urpmi code I am supposed to use to set the updates. Id there a urpmi sequence to get the updates?
Thnaks
Comment 19 Oliver Burger 2012-08-07 15:44:06 CEST
You need to activate the updates_testing repo. You can do so using drakrpm-edit-media as root.
Please be careful to deactivate after installing the python packages or you will get packages that might be unstable.
Comment 20 Oliver Burger 2012-08-07 15:49:37 CEST
@qa team:

There is an updated python package in updates repo to fix a regression that was introduced with one of the last security updates to python.

Source rpm in question:
python-2.7.3-2.3.mga2.src.rpm

Rpms in question:
see comment #12

---
This updates fixes a regression introduced in the 2.73-2.1 security update.
Accidentally the package build was switched from db4.8 to db5.1
This has been reversed with this update.
---

Testing procedure:
the broken package missed the
/usr/lib64/python2.7/lib-dynload/_bsddb.so file and thus python software using berkeley db did not work any more.
An example package for that regression is gramps.

Status: NEW => ASSIGNED
CC: (none) => oliver.bgr
Assignee: oliver.bgr => qa-bugs

Comment 21 Inga Svensson 2012-08-07 20:08:35 CEST
I tested on Mageia 2 64-bits today, and it works ! The new python packages fix the Gramps problem and I don't have "ImportError: No module named _bsddb" problem anymore. Thank you Olivier for your support & reactivity !

@Gary: I think that your mirror didn't sync yet. Yesterday i cound'nt see the packages and today I saw and installed them successfully.

I will continue playing with Gramps and tell you back if I face new problems, but it seems to work correctly.

Status: ASSIGNED => NEW

user7 2012-08-08 19:19:02 CEST

CC: (none) => wassi
Whiteboard: (none) => has_procedure, MGA2-64-OK

Comment 22 Samuel Verschelde 2012-08-08 20:13:58 CEST
We got testing reports for both archs confirming that the problem is fixed. I started various programs depending on python and saw no obvious regression.

Let's validate this one fast, since the current python package in updates is broken. Update validated.

SRPM: python-2.7.3-2.3.mga2.src.rpm

--- Advisory ---
This update fixes a regression introduced in the 2.73-2.1 security update.
Accidentally the package built was switched from db4.8 to db5.1. This has been reversed with this update.

Keywords: (none) => validated_update
CC: (none) => stormi, sysadmin-bugs
Whiteboard: has_procedure, MGA2-64-OK => has_procedure, MGA2-64-OK, MGA2-32-OK

Comment 23 Thomas Backlund 2012-08-18 13:23:38 CEST
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0160

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.