Closed codelocksdev closed 5 years ago
The root element is not a person - its a special element that "anchors" the dictionary. This is done because all the elements become a "child" to the "parent" element.
In your case you want to iterate through your "all_records" and look for individuals:
all_records = gedcom.get_root_child_elements()
for record in all_records:
if record.is_individual():
parents = gedcom.get_parents(record)
for parent in parents:
print (parent.get_name())
Thank you.
This behavior will become more clear with version 1.0.0 @sstephans :) There will be derived Element
classes like RootElement
and IndividualElement
.
Thank you! :)
That's exciting! I've been having a lot of fun with this repo, using it to make custom google maps of ancestors. Thanks for your work!
Hello, I'm trying to separate out the maternal vs paternal lines in my gedcom. Here's the code as I have it now:
and I get the following output:
What am I doing wrong?