Addon Manager and addon lists problems for non-English Gramps

Anyone else experienced the following oddity?
Familytreeview is added as a project in the app manager, together with the url - as per the install instructions. However, with a tick in the box for the project, Gramps often (although not always) crashes when I open the app manager. If I untick the box, the app manager works as it should (but then of course FamilyTreeView won’t show up).

No, I’ve never had any problems with the Addon Manager.

EDITED TO ADD: I’m using 5.2.4 on Windows

1 Like

To be confident, a screen capture of your Projects tab of the Addon Manager would help. And/or a copy of the URL that you use.

(I wonder if there might not be a trailing space or wrong delimiter.)

1 Like

OK, think I found the reason. I start gramps with
export LANG=sv-utf8
and Gramps can’t find a translation:

WARNING: utils.py: line 239: Failed to open addon metadata for sv https://raw.githubusercontent.com/ztlxltl/FamilyTreeView/dist/gramps52/listings/addons-sv.json: HTTP Error 404: Not Found

Now that I know the cause it’s easy to workaround (keep the box unticked and run Gramps in English when updating FTV)

2 Likes

In the get_addons function we get the list of preferred languages and add “en”. Then we look for listings files of the format addons-<lang>.json where <lang> is a two character language code. So the file addons-en.json is the fallback and should always exist.

The user can also provide their preferences the LANGUAGE environment variable. For example, if the user sets LANGUAGE=fr:de then we will look for French, then German, and finally English. The English version should always exist.

1 Like

Addon Manager still has immature parts. It was only in 5.2 that it was implemented to replace the Preferences-based addon management. Other than some tweaks in the 5.2.0 beta cycle, it hasn’t had any enhancing.

Requests for a feedback mechanism for confirming connection ( or failed connection) were submitted during the beta cycle. It took so long for beta testers to understand the subtlties and set up tests that the submissions were too late in the cycle.

There are a significant number of issues filed that were related to the Addon Manager. But since the code is not yet documented, @Nick-Hall is the only person picking up tasks for it.

The localization fallback strategy for addon lists in JSON are one of the items that is unknown. (Is addons-en.json the base? There’s addons-en_GB.json too. And I vaguely recall a language agnostic addons.txt before we switched to JSONs.)

@dsblank recollected having been involved in the decisions about the original addons-xx.txt server path. Maybe he has some opinions about improving the feedback?

1 Like

@Nick-Hall
Thanks for clarifying that! addons-en.json exists. So all the issues that people have reported with different languages (besides the labels being not translated) should be due to bugs or inconsistencies in core Gramps and I am relieved that I have not made any major mistakes in this regard.

1 Like

Thanks to everyone who has looked into the addonmanager issue. After reading the post from Nick-Hall I added a export LANGUAGE line to my start script:

export LANG=sv_SE.UTF8
export LANGUAGE=sv:en
gramps

No more crashes! Although the message about missing addon metadata for sv still appears when running from terminal.
If it somehow helps, here’s the full message when gramps crashes (without the LANGUAGE=sv:en line):

2025-01-16 08:38:22.337: WARNING: utils.py: line 239: Failed to open addon metadata for sv https://raw.githubusercontent.com/ztlxltl/FamilyTreeView/dist/gramps52/listings/addons-sv.json: HTTP Error 404: Not Found
**
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
**
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
/usr/bin/grampsscript: rad 4:  1828 Avbruten (SIGABRT)      gramps

Spoke too soon… crashes still occur, although for some reason they seem to be less frequent after adding the export LANGUAGE=sv:en line. Sometimes the addon manager opens OK, sometimes it causes a crash.

Another observation: If I first open the third-party addon “Plugin Manager - Enhanced” (from Help > Plugin Manager, close it, and then open addon manager, no crashes occurs even if I skip the line ‘export LANGUAGE=sv:en’.
Tested this a number of times, seems to be failsafe.
So starting the “Plugin Manager - enhanced” somehow affects the behaviour of the addonmanager - but I have no clue to what that may be.
I then checked if having “Plugin Manager - enhanced” installed could somehow lead to the crashes so uninstalled it, restarted - but crashes still occurs.

@hamkg
I think the problem you are experiencing is not specific to FamilyTreeView, but is a problem with Gramps itself (apparently the Addon Manager). I kindly ask you to continue investigating this bug in a separate thread (or head directly to Gramps bug tracker). That way, people experiencing this problem can more easily find your investigation, and people reading the FamilyTreeView feature requests can more easily find the FamilyTreeView specific comments in this thread.

You can ask @emyoulation if he wants to move your comments that are not related to FamilyTreeView to a new thread if you want to keep them in your new discussion.

That being said, I definitely encourage you to post feature requests and bug reports related to FamilyTreeView here or as an issue on Github!