Graph view is not saving settings

Hi.

A few weeks ago I detect that settings of Graph View was not loading correctly.

I thought that it was a minor problem with my system, but today an Italian user has report an identical problem on Facebook too.

Problem consists that, each time you open Gramps, Graph view always loads the same configuration.

1 Like

This is symptom of not being able to write updates to the settings (.ini) files for the affected view.

This usually indicates a corruption in those files.

Un-installing and re-installing Gramps will NOT resolve corrupted settings files. You have to go into the Gramps User Directory and clean those manually.

1 Like

I have not been watching the updates for this addon but recall discussions about changing something in the avatars.

Could it be that the setting parameters for avatars changed and Gramps is choking on the old settings format?

If the problem lies in corrupted .ini files, it would be very helpful to save the current settings by copying to another location or if it’s just a few files, rename them individually. If the issue is resolved by the application regenerating the settings, then it comparing the old and new may lead us to figuring out what might be going wrong.

2 Likes

Hi,
I was the one posting it on FB.
After some tries I got to this conclusion:
it seems that Gramps writes the Ancestry_graphview.ini file on closing, but it does not read it on opening. … may be …

1 Like

It happens to me too.

1 Like

I also confirm that this happens on

GRAMPS: 5.2.3
Python: 3.11.9
BSDDB: not found
sqlite: 3.42.0 (2.6.0)
LANG: en_GB.UTF-8
OS: Linux
Distribution: 6.4.0-150600.23.17-default

It is not quite consistent, however, In graphview I always set, by hand,
no IDs
full dates
no avatars
no animation

and sometimes I get one or the other setting (but not all) as ignored when restarting gramps. But the next time I have to set them again Very strange!

1 Like

I so sorry but i think that this is an developper error.

Sometimes Graph view loads different settings. So Graph view is not loading default options.

These are my preferences:

Graph View sometimes load these options:

and sometimes loads these options:

1 Like

Looked up the contact info in the Addon List. That contributor does not seem to have an account here on Discourse. So sent an eMail pointing to this thread. Perhaps he can suggest something.

1 Like

I have reported on bugtracker
https://gramps-project.org/bugs/view.php?id=13399

3 Likes

Hi!

I found a way to solve the problem. I made a correction in the Graph View code that seems to fix it.

I replaced all occurrences of ‘interface.graphview-show-ID’ with ‘interface.graphview-show-id’ in the file graphview.py. This solution worked for me.

I have been testing this change for several days and have already notified it in the bugtracker.

1 Like

I don’t understand your problem. For me, you changed the code or manually modify the ini file.
You can see the bug report.

Yes, I modified the code. After removing and reinstalling the plugin twice without solving the problem, I decided to review the code.

Hi @SNoiraud

@ommrianxo’s finding about the capitalization of “ID” in ‘interface.graphview-show-ID’ prompted me to take a quick look at some of the config/preference code. Nothing jumped out immediately that indicated that there’s case sensitivity, but several other users reporting this behavior seems to indicate that there might be something to it.

The code that introduced this setting seems to be very recent and reviewing names of other settings in addons-source and gramps code, I don’t see any with capitalized letters so far, so I wonder if it is exposing unknown behavior?

1 Like

GRAMPS: 5.2.2
Python: 3.12.3
BSDDB: 6.2.9 (5, 3, 28)
sqlite: 3.45.1 (2.6.0)
LANG: it_IT.UTF-8
SO: Linux

In Graphview I cant’t memorize “ShowIDs” and “Showavatars” to 0.
Each time I re-open the database I find one of the two, or both, set to 1.
thanks
antonio

In another thread, I wondered if adding configuration options might cause a backwards compatibility problems with saved settings.

In other situations, we’ve noted preferences/configuration information that was “corrupted” and deleting the file let Gramps start the file afresh. (The most consistent examples were when upgrading to a new major Gramps version. The addons all had settings contributed. But until the addons were re-downloaded, those setting were unrecognized. Custom Filters using addon Rule Packs were likewise at risk.)

As I add new Configuration option to a specific Gramplet, I wonder if some handling of ini files as chunk-based file format or container formats could be enhanced for more failure resistance and better purging of bad chunks. And if versioning information shouldn’t be in plugin settings chunks.

Today I modified the file graphview.py changing the default line 155
(‘interface.graphview-show-ID’, True),
to
(‘interface.graphview-show-ID’, False),

It seems to work …

1 Like

Does this not mean that the preferences reading code is encountering an error when trying to read (or save) the setting in the Gramps User Directory and failing back to the defaults?

Is there some simple code that might be implemented to flush a named section of preferences?

as far as I could see, the writing of the .ini file is correct, the problem is in the subsequent reading

1 Like

@Antonio You mentioned that “Show Avatars” was not working either. When you changed just the show-id on line 155 of graphview.py, did Show Avatar setting also start working?

My hypothesis is that the upper case in show-ID setting might be an issue, but the show-avatar settings are all specified in lower case so I might not expect any problems with that.