Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250945 - app-misc/gramps-3.0.3 - gramps: AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'
Summary: app-misc/gramps-3.0.3 - gramps: AttributeError: 'module' object has no attrib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Steve Dibb (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-14 16:08 UTC by David Relson
Modified: 2008-12-31 11:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Relson 2008-12-14 16:08:56 UTC
An attempt to create a "New" geneology database results in a dialog titled "Error Report - GRAMPS" and saying "GRAMPS has experienced an unexpected error"


Reproducible: Always

Steps to Reproduce:
1.Select FamilyTrees::ManageFamilyTrees
2.Select New
3.

Actual Results:  
Dialog pops up titled "Error Report - GRAMPS"

  GRAMPS has experienced an unexpected error

Selecting "Error Detail" gives:

76581: ERROR: gramps.py: line 160: Unhandled exception
Traceback (most recent call last):
  File "//usr/share/gramps/DbManager.py", line 836, in __new_db
    self._create_new_db()
  File "//usr/share/gramps/DbManager.py", line 846, in _create_new_db

Expected Results:  
I expected to see a "New" dialog of some kind.

Selecting "Report" option gives a "Report a bug" screen with enabled "Cancel" and "Forward" options.  Neither option does anything and I have to use the "kill" command to exit gramps.

Also, .xsession-errors reports:

/usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5

Changing the line to "import hashlib" doesn't affect the behavior of "New"...

Possibly relevant is that python is built with both BerkDB and SQLite support.
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-14 21:24:51 UTC
Please paste your "emerge --info" output, and also your "emerge -pv gramps" output. 
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-15 01:41:31 UTC
(In reply to comment #0)
> 1.Select FamilyTrees::ManageFamilyTrees
> 2.Select New
> 3.
> 
> Actual Results:  
> Dialog pops up titled "Error Report - GRAMPS"
> 
>   GRAMPS has experienced an unexpected error
> 
> Selecting "Error Detail" gives:
> 
> 76581: ERROR: gramps.py: line 160: Unhandled exception
> Traceback (most recent call last):
>   File "//usr/share/gramps/DbManager.py", line 836, in __new_db
>     self._create_new_db()
>   File "//usr/share/gramps/DbManager.py", line 846, in _create_new_db

Um, seems you cut away all the useful output of the python traceback... Please post all of it or put it in an attachment.
Comment 3 David Relson 2008-12-15 02:14:04 UTC
Ah, the wonders of copy-n-paste!  Sorry about the truncated output.  Here's output generated by starting gramps at the command line:


root@osage ~ # /usr/bin/gramps
5957: WARNING: Spell.py: line 58: Spelling checker is not installed
/usr/share/gramps/ThumbNails.py:31: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
13457: ERROR: gramps.py: line 160: Unhandled exception
Traceback (most recent call last):
  File "//usr/share/gramps/DbManager.py", line 836, in __new_db
    self._create_new_db()
  File "//usr/share/gramps/DbManager.py", line 846, in _create_new_db
    new_path, title = self._create_new_db_cli(title)
  File "//usr/share/gramps/DbManager.py", line 202, in _create_new_db_cli
    newdb.write_version(new_path)
  File "//usr/share/gramps/gen/db/dbdir.py", line 1700, in write_version
    self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'

Comment 4 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-16 10:44:56 UTC
(In reply to comment #1)
> Please paste your "emerge --info" output, and also your "emerge -pv gramps"
> output. 
> 

Please paste the above information and we will assign the bug to the proper maintainers. 
Comment 5 David Relson 2008-12-16 12:26:50 UTC
### emerge --info ###
Portage 2.1.6 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3-cm-iglx i586)
=================================================================
System uname: Linux-2.6.26-gentoo-r3-cm-iglx-i586-Geode-TM-_Integrated_Processor_by_AMD_PCS-with-gentoo-1.12.11.1
Timestamp of tree: Fri, 12 Dec 2008 04:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r8, 2.6-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -mtune=k6-2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -mtune=k6-2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --nospinner --tree --with-bdeps y"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="-h -h"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl berkdb bitmap-fonts bzip2 cli cracklib crypt dri emacs firefox gdbm gpm gtk iconv isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd tk truetype-fonts type1-fonts unicode x86 xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="geode nsc fbdev v4l vesa vga"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

### emerge -pv gramps ###

These are the packages that would be merged, in reverse order:

Calculating dependencies  ....... done!
[ebuild  N    ] app-misc/gramps-3.0.3  USE="reports -debug" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2008-12-21 00:55:49 UTC
My python is compiled with USE="berkdb sqlite" and I don't have such problems.  Please try the following commands on a python shell (start python in a terminal):

Python 2.5.2 (r252:60911, Nov  2 2008, 11:03:22) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bsddb
>>> bsddb.db.version()
(4, 5, 20)
>>> bsddb.db.DB_LOG_AUTOREMOVE
524288

Which versions of sys-libs/db are installed on your system?
Comment 7 Christian Faulhammer (RETIRED) gentoo-dev 2008-12-21 00:59:10 UTC
I expect some problem here because you use python 2.6 on your system...
Comment 8 Christian Faulhammer (RETIRED) gentoo-dev 2008-12-22 12:46:04 UTC
(In reply to comment #7)
> I expect some problem here because you use python 2.6 on your system...

 Gramps 3.0.4 is in the tree and the ChangeLog mentions "Python 2.6 issues fixed".  I would like you to test that version first.

Comment 9 David Relson 2008-12-22 21:23:16 UTC
Code has been added to gramps-3.0.4 use the appropriate flag name (which depends on the version of BerkeleyDB in use). See method set_auto_remove() in file gen/db/dbdir.py.
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2008-12-31 11:45:43 UTC
No reaction from reporter...and everything points out that this issue is fixed.  Closing.