Life line ancestor and life line descendant chart views not working in 5.2

Gramps AIO64 5.2.0 on both Win 10 Pro and Win 11 Pro

Having just upgraded from 5.1.6 to 5.2.0 I find the ‘Views’ called:
Life Line Ancestor Chart (1.3.22)
Life Line Descendant Chart (1.3.22)
appear to download and install, i.e. no errors are given but after the usual restart to finalise their installation, they are not showing as options when I switch to the Charts view.

Is that because these views are yet to be updated to be compatible with v5.2.0?

Thanks

EDITED TO ADD:
When I installed these Views in v5.1.6 I did get the ‘missing prerequiste’ dialogs (and duly downloaded them) but in v5.2.0 I haven’t had such a warning.

These views work with the latest release. The latest version is 1.3.22.

In the “Settings” tab in the Addon Manager, have you selected the “Allow Gramps to install required Python modules” option? This is a new feature in v5.2 and will allow pure python dependencies to be installed automatically.

Look in your plugins folder. Can you see a folder called “LifeLineChartView”? You should also see folders for the svgwrite and life_line_chart dependencies.

1 Like

No, I hadn’t, I didn’t know it was there.

Having ticked that box when I tried again to install the Life Line Ancestor View I got an error. Unfortunately, I couldn’t file as a bug report because I couldn’t select ‘gramps’ from the project drop down. Instead, I’ve pasted the bug report below.

Despite the error, having closed and restarted Gramps, both the Life Line Ancestor and the Life Line Descendant Views are available to me and do work.

Thank you!


User Information:

trying to install life line ancester view

Error Details:

58316: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
File “C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug_windows.py”, line 322, in __on_install_clicked
self.manager.install_addon(addon[“i”])
File “C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug_windows.py”, line 560, in install_addon
self.__pmgr.load_plugin(pdata)
File “C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\pluginmanager.py”, line 88, in load_plugin
if not self.is_loaded(pdata.id):
^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘id’

System Information:

Gramps version: AIO64-5.2.0-r1-6167151
Python version: 3.11.8
BSDDB version: 6.2.9 (6, 0, 30)
sqlite version: 3.45.1 (2.6.0)
LANG: en_GB.UTF-8
OS: Windows

GTK version : 3.24.41
gobject version: 3.46.0
cairo version : (1, 26, 0)

1 Like

Aha! That’s what I was missing too…I could not figure out why Addon Manager would not show Install button in the UI!

1 Like

This is the intended functionality. If the requirements of an addon are not met then we display the “Requires” button instead of the “Install” button. This gives the user the opportunity to install the dependencies manually.

We are able to install pure python modules that are in the PyPI repository automatically, but this option is not enabled by default. Perhaps we should make it the default?

The error message implies that the addon was installed and registered before the automatic install option was enabled. I’m not sure how this could happen. When we try to register the addon, the registration is skipped because of the previous registration. The solution is probably to force the registration as we already do for updates. I’ll need to investigate this further.

I got that far but…

Except there’s no option in that dialog to install the missing modules and, since I didn’t know about the tick box elsewhere in the Addons Manager, I was stuck (pun intended).

As someone who thinks he’s pretty good with things Windows but has never ventured anywhere near Linux I’d say, yes, it should.

The sequence events that led to the error were:

  1. Yesterday, I didn’t have the 'Allow Gramps to install…" tick box ticked
  2. Via the ‘old style’ search for updates dialog, I selected both of the Life Line Views and ‘installed’ them.
  3. I got no error messages but after restarting Gramps the views were not available.
  4. I probably went round that loop a couple of time with the same end result.
  5. I left it and shutdown the PC.
  6. Today, I tried again, still no joy.
  7. I started this topic and learnt about the essential to tick tick box.
  8. After ticking the box I tried the install again, first with the Ancestor Life Line, this time via the ‘new’ Addon Manager dialog.
  9. A command box Window opened and some commands were invoked.
  10. When everything seemed to be finished, that’s when the error appeared.
  11. I got the same error when I installed the Descendant version.
  12. I was about to give up but after one final restart of Gramps the Views appeared

The process of changing the Addon Manager to Allow Gramps to install required Python modules seems to require both PIP and restarting Gramps. (A better label might be : “Use PIP to install required Python modules” with it dimmed and a “(PIP not available)” beside if if that is the case. The AIO installer includes PIP. The macOS installer does not. And the Linux distribution packages are hit and miss.)

And the Requirements dialog needs some indicator that the PIP is missing and/or the Install Python Modules feature is not enabled:

Thank you. That is the key piece of information that I needed.

Even if you install an addon using the updates dialog or perhaps manually, the addon will not load if its prerequisites are not installed. This will even safeguard against a user installing an addon and then removing its dependencies.

When using the Python Module install on Fedora 39, it apparently didn’t have PIP. I got:

59352440: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/gramps/gui/plug/_windows.py", line 289, in __on_install_clicked
    subprocess.check_output(
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pip'

And on Windows10pro, with the AIO which includes PIP, the following message:

44936: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug\_windows.py", line 322, in __on_install_clicked
    self.manager.install_addon(addon["i"])
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug\_windows.py", line 560, in install_addon
    self.__pmgr.load_plugin(pdata)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\pluginmanager.py", line 88, in load_plugin
    if not self.is_loaded(pdata.id):
                          ^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'

We should probably make it a feature for Windows only. I can’t see much benefit of using it in Linux.

1 Like

I’m sure that when I installed these Views in Gramps 5.1.6 (so via the ‘old style’ check for updated addons dialog), because the prerequistes were not present it told me that and immediately asked if I wanted to install them. When I said yes, everything installed and the Views worked first time.

Whereas in Gramps 5.2.0, via the ‘old style’ dialog it didn’t tell me the prerequistes were missing, it just went ahead and downloaded the Views and appeared to install them, and then of course the Views didn’t work. To me, that feels like a bug in the way v5.2.0 works compared to v5.1.6.

While I know nothing of coding applications, and even less about Linux, I like to think I know a fair bit about Windows applications (I spent the last 20 years of my career making Word & Excel do clever stuff). In that context, the new v5.2.0 Addon Manager, to me, feels incomplete. When presented with a ‘Requires’ option, instead of an ‘Install’ button, after I’ve clicked on that Requires button and got a dialog telling me what was needed, I’d expect to be able to click on another button in that dialog that seamlessly installs the missing bits and then the Views.

Does this make sense?

In v5.1.6, Gramps didn’t know anything about addon prerequisites. Installing them had to be done by writing specialised code for each addon.

In v5.2.0, the code to install prerequisites is moved into the core. When writing a new addon the developer simply has to provide a list of dependencies. No extra code is required. We also use pip internally which will install the latest versions.

It is useful to know what prerequisites are missing because some users may choose to install them for themselves. This tends to be the preferred method for Linux. There are also three types of dependency, of which only pure python modules in the PyPI repository can be installed automatically. Standalone programs and GObject libraries will have to be installed manually anyway.

The new Addon Manager interface is heavily influenced by Matthias Kemmer’s addon listings web page. This was just the starting point for the first implementation. Feedback from users will determine its future direction of development or even if we decide to keep it.

I envisaged that the ‘old style’ dialog would be used to update addons rather than to add new addons. We could enhance it to install prerequisites just like the Addon Manager does. These are just things that are starting to emerge.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.