New FamilyTreeView Addon

Just to make sure I have this right: You installed FamilyTreeView by downloading/cloning the repo. Now you upgraded using the Addon Manager.
I don’t think I’ve tested this workflow before, but I’m glad it works.

Anyway, I don’t have a MacOS machine to test under MacOS. But the error seems to come from a gramps module:

There is no stack trace entry in your traceback pointing to the code of FamilyTreeView, so I believe this is not directly related to this addon. Maybe this is a but in Gramps?
Has anyone else experienced this?

No, I haven’t made a manual install at any time, only using Addon Manager.

There are bugs report about it: 0013485: Gramps crashed while browsing pedigree [ AttributeError: 'NoneType' object has no attribute 'get_child' ] - Gramps - Bugtracker – Free Genealogy Software

1 Like

Personally, I prefer the graphic view.
1 - We cannot jump directly to a person.
2 - I have font placement issues
3 - We can’t delete the person’s images (avatars)

The font problem:

1 Like

I had done/redone a good part of the French translations for Gramps v5.2, if @emyoulation explains to me how (with which tool) to translate this addon I can also do it.

More generally, how to do that for (a lot of) addons that need it?

1 Like

@SNoiraud
Thank you for your feedback.

  1. I plan to integrate the SearchBar of Graph View to search and jump to a person. As I wrote in the original post, I’m not sure how to do this without creating a copy of the file that needs to be manually updated when the original files change. I’m looking for a method to easily reuse it, maybe I’m just missing something simple here.
    Would the SearchBar solve the missing “jump directly to a person” option, or do you have something else in mind?
  2. The text placement is definitely not correct in your case. I kindly ask you to open an issue on Github to discuss what’s special about your setup so I can fix this and make it look right on more systems.
  3. By “We can’t delete the person’s images (avatars)” do you mean hiding the avatar? Should there be nothing (box background) where the avatar currently is (when there is no image of the person)? Or should the box be smaller and no image be invisible for all people? I should be able to add an option to make the boxes smaller and show no image or avatar at all for all people. I don’t like to leave the top half of the person box empty for people with no image, but this would also be possible if desired.

@PLegoux
Thank you for offering your help. Unfortunately, I don’t know how translation works in Gramps in general and translation of addons in particular, but I can look into it.

I don’t know if this has been reported before but the description of the events on the timeline is missing:

Also post on Github: Description of the events on the timeline is missing · Issue #10 · ztlxltl/FamilyTreeView · GitHub

1 Like

@PLegoux
That has been reported before by @roptat. I’m working on a flexible solution for this, as it doesn’t make sense to show the description for all event types. Thanks for opening the GitHub issue!

1 Like

@roptat
I just pushed an update that tries to fix the problem with the info box being too small to fit all the content. The new implementation should work, although in some cases the info box is a bit too big. I cannot find the reason why this is the case, but the info box should no longer be too small and the buttons should be clickable.
Please test with the latest version (0.1.17) and let me know if this fixes your problem.

It is fixed for the extreme cases I found, but it doesn’t seem to be fixed completely in some other cases. The buttons still overflow slightly, but they are clickable at least:

1 Like

I installed this plugin
It didn’t appear right away as a plugin: it was running out of memory… apparently 2 dependencies (Goocanvas,and…svg2…) I installed the 2nd one, everything seemed to work except the time graph which “flashed” then a click on I don’t know which option anymore … an avalanche of error messages saturated my system, I could only regain control with a wild shutdown …
Here is what the system offered to feed a bug report

User Information:

===================




Error Details: 
===================

333011: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

333896: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

336774: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

369476: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

397630: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

398302: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

399188: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

400294: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412076: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412354: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412526: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412719: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412776: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412962: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

412987: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

413182: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

413390: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

413774: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

414180: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'

414214: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/bjc49/.gramps/gramps52/plugins/FamilyTreeView/family_tree_view_timeline.py", line 414, in draw_timeline
    for i in range(root_item.get_n_children()-1, -1, -1):
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_n_children'


System Information: 
===================

Gramps version: 5.2.3 
Python version: 3.12.3 
BSDDB version: 6.2.9 (5, 3, 28) 
sqlite version: 3.45.1 (2.6.0) 
LANG: fr_FR.UTF-8
OS: Linux
Distribution: 6.8.0-51-generic

GTK version    : 3.24.41
gobject version: 3.48.2
cairo version  : (1, 25, 1)`
Just for info So I gave up on this test because it's beyond my skills

Personally I would like smaller boxes, especially in earlier generations where no photos are available.

1 Like

Our Discourse forum has several (too many!) threads discussing Localization of Addons. (None are “conclusive” in my opinion.) Let us continue this “localization” part of improving the FamilyTreeView in one of those.

The localization workflow is outside my understanding. (I learn by documenting my experimentation … and you must be at least bilingual to effectively experiment with localization.)

The closed threads have been re-opened and they have been tagged with:

Search for both tags simultaneously (finds 6): search for “tags:localization+third-party-addon” or use the URL:
https://gramps.discourse.group/search?q=tags%3Alocalization%2Bthird-party-addon

1 Like

@roptat
I really don’t know why the result is still not as intended. If anyone has experience with Gtk and wants to take a look at the code, I would appreciate knowing why it doesn’t work and how to fix it. This is the core of the current implementation for setting (and updating) position and size of the info box. I’m open to any comments, tips and pull requests.

@bjc49
I’m very sorry for these problems. That’s why I (and many others) strongly recommend to do backups before testing addons.

Unfortunately, will not be able to reproduce this without more information. However, I will try to fix this as soon as possible. The error message is quite clear.

1 Like

Having used both methods, Weblate and .po, I have a preference for the first which seemed more practical to me.

2 Likes

@Nick-Hall has also suggested that starting to use Weblate for Addons might be the best approach. But he is unlikely to have bandwidth until after Gramps 6.0 has been released and post-release activity becomes quiet.

The workflow documentation for the .po method seems very convoluted to me. (The workflow might be straightforward or fussy. I do not know. Because the documentation is so messy that I cannot follow it.)

1 Like

@bjc49
I’ve just pushed a fix (v0.1.18). Since I cannot reproduce your errors, I’m not sure if there’s an underlying problem that’s not visible in the error messages. If you like, you can update and try again to see if it works now. Please make sure you have GooCanvas installed first, as it is required for FamilyTreeView. If it’s missing, this could be the root cause, but I would expect a different error message in that case. Fingers crossed!

The way I have done it (during the development of the HistContext gramplet) is:

  • running xgettext *py, in the directory of the plugin.
  • Then moving/copying the resultant messages.po to po/template.pot.
  • and then do the translation in poedit.

Important thing is that your Python source code uses the correct ‘translatable’ string format for your strings: _("Foreground color items outside lifespan")

2 Likes