Bug 480806 - Cannot open grdb files
Summary: Cannot open grdb files
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gramps
Version: 10
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jeffrey C. Ollie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-20 17:14 UTC by ajs
Modified: 2009-02-06 05:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-21 11:19:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Error box attachment #1 (26.59 KB, image/png)
2009-01-20 17:28 UTC, ajs
no flags Details
Error box attachment #2 (17.03 KB, image/png)
2009-01-20 17:29 UTC, ajs
no flags Details

Description ajs 2009-01-20 17:14:06 UTC
Description of problem:
I have tried several methods to open a .grdb file


Version-Release number of selected component (if applicable):
gramps-2.2.10-1.fc9.noarch
  and
gramps-3.0.3-0.fc10.noarch


How reproducible:
always


Steps to Reproduce:
Case 1: Using gramps-2.2.10-1.fc9.noarch on F10 to open a .grdb file created
        with presumably the same version under F9
 1.1) from the command line 'gramps ajs-bed.grdb'
 1.2) An error dialog shows (after the progress bar shows 12%)
        Could not open file: /home/anthony.seward/personal/gramps/ajs-bed/ajs-bed.grdb
        'module' object has no attribute 'DB_LOG_AUTOREMOVE'

      see atachment_01.png

 1.3) The command line shows
        LPRDoc: Free true type fonts not found.
        Microsoft true type fonts not found.
        Using Gnome standard fonts.
        Non-ascii characters will appear garbled in the output.
        INSTALL Free true type fonts
        from http://www.nongnu.org/freefont/
Trying to open: ajs-bed.grdb ...
Type: GRAMPS database
Traceback (most recent call last):
  File "/usr/share/gramps/DbLoader.py", line 443, in read_file
    self.dbstate.db.load(filename,self.uistate.pulse_progressbar,mode)
  File "/usr/share/gramps/GrampsDb/_GrampsBSDDB.py", line 340, in load
    self.env.set_flags(db.DB_LOG_AUTOREMOVE,1)  # clean up unused logs
AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'

Case 2) Using gramps-2.2.10-1.fc9.noarch on F10 Save a Gramps XML database to
        grdb file format
 2.1) from the command line 'gramps ajs-bed.gramps'
 2.2) The command line returns
        LPRDoc: Free true type fonts not found.
        Microsoft true type fonts not found.
        Using Gnome standard fonts.
        Non-ascii characters will appear garbled in the output.
        INSTALL Free true type fonts
        from http://www.nongnu.org/freefont/
Trying to open: ajs-bed.gramps ...
Type: GRAMPS XML database
Opened successfully!

 2.3) File->Save As
  2.3.1) select the grdb file type and enter a file name
  2.3.2) Click 'Save'
  2.3.3) A GRAMPS error report dialog gives the traceback

        234670: ERROR: DbLoader.py: line 488: Failed to open database.
Traceback (most recent call last):
  File "/usr/share/gramps/DbLoader.py", line 485, in open_saved_as
    self.uistate.pulse_progressbar)
  File "/usr/share/gramps/GrampsDb/_GrampsBSDDB.py", line 465, in load_from
    self.load(filename,callback)
  File "/usr/share/gramps/GrampsDb/_GrampsBSDDB.py", line 340, in load
    self.env.set_flags(db.DB_LOG_AUTOREMOVE,1)  # clean up unused logs
AttributeError: 'module' object has no attribute 'DB_LOG_AUTOREMOVE'

Case 3: Using gramps-3.0.3-0.fc10.noarch on F10
 3.1) From the command line 'gramps ajs-bed.grdb'
 3.2) An error dialog appears that says

          '/tmp/tmp0Kbs_e could not be opened'

  3.2.1) 'ls -l /tmp/tmp0Kbs_e' shows

        -rw------- 1 <my_uid> <my_gid> 5029888 2009-01-20 09:26 /tmp/tmp0Kbs_e

         so it is 'rw' for me

 3.3) The command line shows

       Upgrading INI file
warning: line 6553: incompatible stripping characters and condition
warning: line 6565: incompatible stripping characters and condition
Trying to open: ajs-bed.grdb ...
Type: GRAMPS 2.2.x GRDB database
Starting Import, Importing data...
Found import plugin for GRAMPS 2.x database

Case 4: Using gramps-3.0.3-0.fc10.noarch on F10
 4.1) From the command line 'gramps ajs-bed.gramps'
 4.2) The command line shows

          Upgrading INI file
warning: line 6553: incompatible stripping characters and condition
warning: line 6565: incompatible stripping characters and condition
Trying to open: ajs-bed.gramps ...
Type: GRAMPS XML database
Starting Import, Importing data...
Import finished...

 4.3) The media links are now all incorrect (this was the motivation for saving as a .grdb database in the first place)

This seems like a problem with the interface with the Berkley database and GRAMPS on F10

Python version: 2.5.2 (r252:60911, Sep 30 2008, 15:42:03)
BSDDB version: 4.4.5.3 
Gramps version: 2.2.10-1

Comment 1 ajs 2009-01-20 17:28:55 UTC
Created attachment 329483 [details]
Error box attachment #1 [details]

Comment 2 ajs 2009-01-20 17:29:53 UTC
Created attachment 329485 [details]
 Error box attachment #2 [details]

Comment 3 ajs 2009-01-20 17:54:48 UTC
Possible cause?: On F8 and F9, Python was compiled against db4-4.6 whereas on F10 it is compiled against db4-4.7

Comment 4 Fedora Update System 2009-01-20 20:45:10 UTC
gramps-3.0.4-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gramps-3.0.4-1.fc10

Comment 5 Jeffrey C. Ollie 2009-01-20 21:15:42 UTC
I've built gramps 3.0.4, which should be in updates-testing soon.  I'm not sure why 3.0.3 was failing because there was a patch added that was supposed to fix those issues.  Anyway, give 3.0.4 a try and see if it's fixed.

Comment 6 ajs 2009-01-20 22:40:39 UTC
Same result as Case 3.

entering 'file /tmp/tmpPqkIn4' yields:
  /tmp/tmpPqkIn4: Berkeley DB (Btree, version 9, native byte-order)

Comment 7 Jeffrey C. Ollie 2009-01-20 22:49:04 UTC
Has this been reported upstream?

Comment 8 ajs 2009-01-20 23:16:55 UTC
Yes, bug number 2608

Comment 9 ajs 2009-01-21 11:19:28 UTC
From upstream: Not a bug

See http://gramps-project.org/wiki/index.php?title=Recover_corrupted_grdb

Comment 10 Fedora Update System 2009-02-06 05:18:57 UTC
gramps-3.0.4-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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