6.0rc1 ... updating schema Unexpected Errors

Just reset my Win10pro box back to factory (no internet connection) and copied the GrampsAIO-6.0.0-rc1-1_win64.exe installer by USB thumbdrive (aka SneakerNet.)
Also copied 3gb of grampsdb folder (696 files) to the desktop foler

On the install, installed ALL the languages and dictionaries.
Opted to NOT open the application after the install finished

Copied the Gramps Console launcher from the Start Menu to the taskbar
launched Gramps console
Gramps application launched (in a small windows)

First error is trivial, TipOfTheDay and Family Tree Manager pop-up windows are correctly centering vertically on the Gramps application but incorrectly horizontally: half off-screen to the left. (Like the dialog is centered on 0,y instead of x,y )

Then I open Preferences and set the database path to the copy grampsdb folder on the desktop.

The first database I opened was a “Royals” tree in schema 20. When converting, lots of Unexpected Errors in the dialog console:

Unexpected error

88441: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1066, in __open_activate
    self._post_load_newdb(filename, "x-directory/normal", title)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1103, in _post_load_newdb
    self._post_load_newdb_gui(filename, filetype, title)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1152, in _post_load_newdb_gui
    self.__change_page(self.notebook.get_current_page())
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 984, in __change_page
    self.active_page.set_active()
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 318, in set_active
    NavigationView.set_active(self)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\navigationview.py", line 151, in set_active
    PageView.set_active(self)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\pageview.py", line 373, in set_active
    self.build_tree()
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 346, in build_tree
    self.model = self.make_model(
                 ^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 610, in __init__
    TreeBaseModel.__init__(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 368, in __init__
    self.rebuild_data(self.current_filter, skip=skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 526, in rebuild_data
    self._build_data(self.current_filter, None, skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 595, in _rebuild_filter
    self.__rebuild_filter(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 639, in __rebuild_filter
    add_func(handle, data)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 651, in add_row
    name_data = data.primary_name
                ^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'primary_name'


Console:

2025-03-02 16:20:09.461: WARNING: upgrade.py: line 2310: If upgrade and loading the Family Tree works, you can delete the zip file at C:\Users\test\Desktop\Royals_2025-03-02_16-20-09.zip
Warning: DbState: Exception occurred in callback function.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gen\utils\callback.py", line 424, in emit
    fn(*args)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 854, in change_db
    self.build_tree()
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 346, in build_tree
    self.model = self.make_model(
                 ^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 610, in __init__
    TreeBaseModel.__init__(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 368, in __init__
    self.rebuild_data(self.current_filter, skip=skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 526, in rebuild_data
    self._build_data(self.current_filter, None, skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 595, in _rebuild_filter
    self.__rebuild_filter(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 639, in __rebuild_filter
    add_func(handle, data)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 651, in add_row
    name_data = data.primary_name
                ^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'primary_name'
2025-03-02 16:20:09.783: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1066, in __open_activate
    self._post_load_newdb(filename, "x-directory/normal", title)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1103, in _post_load_newdb
    self._post_load_newdb_gui(filename, filetype, title)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 1152, in _post_load_newdb_gui
    self.__change_page(self.notebook.get_current_page())
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\viewmanager.py", line 984, in __change_page
    self.active_page.set_active()
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 318, in set_active
    NavigationView.set_active(self)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\navigationview.py", line 151, in set_active
    PageView.set_active(self)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\pageview.py", line 373, in set_active
    self.build_tree()
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\listview.py", line 346, in build_tree
    self.model = self.make_model(
                 ^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 610, in __init__
    TreeBaseModel.__init__(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 368, in __init__
    self.rebuild_data(self.current_filter, skip=skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 526, in rebuild_data
    self._build_data(self.current_filter, None, skip)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 595, in _rebuild_filter
    self.__rebuild_filter(
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\treebasemodel.py", line 639, in __rebuild_filter
    add_func(handle, data)
  File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\peoplemodel.py", line 651, in add_row
    name_data = data.primary_name
                ^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'primary_name'

Closed gramps and restarted and it loaded without errors. (Although the Tip of the Day was again half off-screen) But reloading the Royals tree did not cause an immediate error. … until switching from the Dashboard to the People view. Then the same errors again.

zip of database attached to

  • 0013674: [6.0rc1] Opening a schema 18 or 20 grampsdb (copied from linux) has unexpected errors

The installation might just be bad. Just tried creating a new tree and browsing for a file to import. (There weren’t any importable files on that thumbdrive.)

This created a huge amount of content to the console … about 360 lines of diagnostic text .

Hundreds of :

(gramps.exe:9552): GLib-GIO-CRITICAL **: 20:04:24.431: GFileInfo created without standard::type

(gramps.exe:9552): GLib-GIO-CRITICAL **: 20:04:24.436: file ../glib-2.82.5/gio/gfileinfo.c: line 1610 (g_file_info_get_file_type): should not be reached

The import was only 1 line of text :
(gramps.exe:6228): Gtk-CRITICAL **: 20:09:26.887: gtk_tree_model_get_iter_first: assertion 'GTK_IS_TREE_MODEL (tree_model)' failed

I’m going to uninstall and reinstall.
verified downloaded installer’s SHA256SUM and re-installed. No change in behavior

Using Gramps 6.0rc1 following an Import of an XML backup/export is working.

But updating a schema 18 or 20 to 21 is not. I did a bunch of schema updates with beta2 without problems. What changed?

Possibly a bug in pull request #1992 “Fix upgrades from bsddb”. I have assigned your bug report to @prculley.

2 Likes

Tried replacing the 5 files that were updated in that commit with the prior version (where you had just done a Black formatting update)
The errors do not occur.

  • gramps.gen.db.generic.py
  • gramps.gen.db.upgrade.py
  • gramps.plugins.db.bsddb.bsddb.py
  • gramps.plugins.db.dbapi.dbapi.py
  • gramps.plugins.db.dbapi.sqlite.py
1 Like

I have about 108 (mostly test files) trees to try to import into Gramps. I’ve done about 15 and had 1 fail (a BSDDB that complained of no Blobs in the Person … but it is a 22mb zip) so far.

Is there a way to automate these schema updates tests? It is helpful that each test creates a .zip of the original database folder. That simplifies sharing the problem tree in a MantisBT report