Bug 2294813 - Error when selecting Families from Navigator panel with gramps-5.2.2-2
Summary: Error when selecting Families from Navigator panel with gramps-5.2.2-2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gramps
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2307722 (view as bug list)
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-06-30 14:11 UTC by Steven Usdansky
Modified: 2024-10-03 00:15 UTC (History)
6 users (show)

Fixed In Version: gramps-5.2.3-3.fc41
Clone Of:
Environment:
Last Closed: 2024-10-03 00:15:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steven Usdansky 2024-06-30 14:11:15 UTC
Selecting Families from Navigator panel gives:
  5843: ERROR: name.py: line 1294: 
  Wrong name format string %s
  ERROR, Edit Name format in Preferences->Display to correct
  Wrong name format string %s
  ERROR, Edit Name format in Preferences->Display to correct

then displace Families window with 
  F0000 Error: Edit Name format in Preferences
for both Father and Mother



Reproducible: Always

Steps to Reproduce:
1. Open a converted gramps database
2. Select Families

trying a gramps database that works properly in gramps 5.2.2-1:
1. Open/convert database
2. Select families
Actual Results:  
ID field:     (this is correct)
Father field:        ERROR, Edit Name format in Preferences  
Mother field:        ERROR, Edit Name format in Preferences  
Relationship field:  (this is correct)
Marriage Date field: (this is correct)

Expected Results:  
Names of father and mother will be displayed in their respective fields

Comment 1 Gwyn Ciesla 2024-07-02 20:17:21 UTC
Thank you for filing this: https://gramps-project.org/bugs/view.php?id=13347

I experimented and can reproduce but not fix.

Comment 2 Steven Usdansky 2024-07-03 17:45:46 UTC
From my notes using a gramps db named 202640630_temp:

202640630_temp works GRAMPS: 5.2.2 on D_F40.7:
    Python: 3.12.4
    BSDDB: 6.2.9 (5, 3, 28)
    sqlite: 3.45.1 (2.6.0)
    LANG: en_US.UTF-8
    OS: Linux
    Distribution: 6.8.10-300.fc40.x86_64

202640630_temp works GRAMPS: 5.2.2 on D_F41.5:
GRAMPS: 5.2.2
Python: 3.12.3
BSDDB: 6.2.9 (5, 3, 28)
sqlite: 3.46.0 (2.6.0)
LANG: en_US.UTF-8
OS: Linux
Distribution: 6.10.0-0.rc5.43.fc41.x86_64

202640630_temp does not work GRAMPS: 5.2.2 on S_F41.9:
GRAMPS: 5.2.2
Python: 3.13.0b3
BSDDB: 6.2.9 (5, 3, 28)
sqlite: 3.46.0 (2.6.0)
LANG: en_US.UTF-8
OS: Linux
Distribution: 6.10.0-0.rc5.20240628git5bbd9b249880.47....

Comment 3 Steven Usdansky 2024-08-04 01:41:16 UTC
The error occurs in file usr/lib/python3.13/site-packages/gramps/gen/display/name.py in the try block at Line 1286. I'm getting the following error message when running gramps from the command line:

Wrong name format string %s%s %s
ERROR, Edit Name format in Preferences->Display to correct

Comment 4 Miro Hrončok 2024-08-24 18:36:22 UTC
The code is:

        try:
            exec(s) in globals(), locals()
            return locals()["fn"]
        except:
            LOG.error(...)


First of all, I have no idea what was exec(s) in globals() supposed to do, but I guess it just returns a boolean that is never consumed anyway.

The failure is very likely related to https://peps.python.org/pep-0558/

See also my issue in https://github.com/python/cpython/issues/118888

A more correct code would be:

        try:
            l = locals().copy()  # or alternatively l = {} if you don't care about existing locals()
            exec(s, globals(), l)
            return l["fn"]
        except TypError as e:  # or any other exception you actually expect, not a bare except, EVER
            LOG.error(... use the actual exception text here please ...)

Comment 5 Miro Hrončok 2024-08-24 18:37:00 UTC
*** Bug 2307722 has been marked as a duplicate of this bug. ***

Comment 6 Miro Hrončok 2024-08-24 18:38:15 UTC
Please forward my message to the upstream ticket, I do not want to create an account there.

Comment 7 Elliott Sales de Andrade 2024-08-26 08:08:20 UTC
I opened a PR directly upstream https://github.com/gramps-project/gramps/pull/1761/commits/c02bd2106085a1026a3f44e9811fce40f0816f61

Comment 8 Fedora Update System 2024-09-24 20:13:38 UTC
FEDORA-2024-7e31734eb5 (gramps-5.2.3-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-7e31734eb5

Comment 9 Fedora Update System 2024-09-25 01:34:23 UTC
FEDORA-2024-7e31734eb5 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-7e31734eb5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-7e31734eb5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-10-03 00:15:45 UTC
FEDORA-2024-7e31734eb5 (gramps-5.2.3-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, 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.