Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 372605

Summary: ImportError: No module named bsddb
Product: Gentoo Linux Reporter: Sébastien Wilmet <sebastien.wilmet>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED WORKSFORME    
Severity: normal CC: gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: My emerge --info

Description Sébastien Wilmet 2011-06-22 17:25:05 UTC
Created attachment 277769 [details]
My emerge --info

Exaile (both 0.3.2.0 and ~0.3.2.1) don't save the music collection.

Steps:
1. Add some folder in the music collection
2. Quit and restart Exaile
3. The collection is empty

Here is the USE flags:

> USE="libnotify nls -cddb"

I attach my emerge --info.

I think it's not a bug in Exaile since there is no problem with the same version in Fedora.

It's maybe a missing USE flag in another package, but in this case emerge should have warned me.
Comment 1 Pacho Ramos gentoo-dev 2011-06-30 08:24:16 UTC
What errors are shown in terminal when running exaile from it and reproducing the problem?
Comment 2 Sébastien Wilmet 2011-06-30 15:30:02 UTC
I solved the problem. Here is the interesting output of exaile --debug:

> 17:14:07,411:ERROR   : Failed to open music DB. (xl.trax.trackdb)
> 17:14:07,412:DEBUG   : Exception caught!
> Traceback (most recent call last):
>   File "/usr/lib64/exaile/xl/trax/trackdb.py", line 169, in load_from_location
>     protocol=common.PICKLE_PROTOCOL)
>   File "/usr/lib64/python2.7/shelve.py", line 239, in open
>     return DbfilenameShelf(filename, flag, protocol, writeback)
>   File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
>     Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
>   File "/usr/lib64/python2.7/anydbm.py", line 82, in open
>     mod = __import__(result)
>   File "/usr/lib64/python2.7/dbhash.py", line 7, in <module>
>     import bsddb
> ImportError: No module named bsddb
>  (xl.trax.trackdb)

I found this mail with the same error:
http://www.mail-archive.com/python-list@python.org/msg305529.html

So the solution is to compile python 2.7 with the 'berkdb' USE flag.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-07-10 17:32:33 UTC
Not true. Exaile is not using bsddb, and already has a depend on the database flag "sqlite" which it uses. Works just fine without berkdb.

I suppose this is somekind of python upgrade issue... So moving to python maintainers.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-07-10 19:01:38 UTC
python ebuild has this:

ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb] to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
ewarn "You might need to migrate your databases."

so I suppose the "You might need to migrate your databases." in this case means deleting ~/.local/share/exaile/*.db files, or propably whole ~/.local/share/exaile directory

I don't think either one, exaile, or python can do anything more than warn you with that message

Close as WORKSFORME?
Comment 5 Sébastien Wilmet 2011-07-10 21:57:28 UTC
Yes you're right. It was old configuration files.

After cleaning ~/.local/share/exaile, it works without berkdb.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2011-07-11 08:15:08 UTC
*** Bug 355367 has been marked as a duplicate of this bug. ***