Graph view is not saving settings

@SNoiraud

What I called “unknown” behavior in a previous message is coming from Python’s ConfigParser - it treats keys as case-insensitive. So introducing a key in Gramps with mixed case like “interface.graphview-show-ID” causes the setting in the ini file to get written out in mixed case, lower case or both entries at times (reproducible). It’s probably best to change the key to lowercase to fix this issue.

If there is a need to have keys with mixed case, another solution may need to be used.

FYI @Nick-Hall

References:

  1. Python ConfigParser - Mapping Protocol Access
  2. Similar question on StackOverflow: ConfigParser reads capital keys and make them lower case
1 Like

I can confirm that now “Show Avatars” remains 0 ( as I like)

1 Like

Hello - This topic has been raised months ago, but it’s still present. If it’s really only a capitalisation issue, can someone change that in the repo, so that it doesn’t come back all the time… This is really annoying.
Thanks

The behavior remains in the 6.0 addon. It can be shown by

With Gramps not running, delete .gramps/gramps52/Ancestry_graphview.ini
In the Charts Graph View, Configure…


reverse all Configuration checkboxes
Quit Gramps
restart Gramps
The Show IDs are selected again (but the other changes were preserved)

Deselect Show IDs again.
Quit Gramps
restart Gramps
All the defaults are back to default.

The problem seems to be:

WARNING: configmanager.py: line 282: WARNING: could not parse file:
/home/districtsupport/.gramps/gramps52/Ancestry_graphview.ini
because While reading from '/home/districtsupport/.gramps/gramps52/Ancestry_graphview.ini' [line 37]: option 'graphview-show-id' in section 'interface' already exists -- recreating it

Submitted a 2nd bug report about the ConfigManager module being able to write an .ini that is error-causing for read.

0013761: Make configmanager consistent in Case Sensitivity for both read and write)

1 Like