Skip to content

can't save gedcom file #27

@ogruenig

Description

@ogruenig

Hello,
I am trying to read in a gedcom file, modify the data and then save a gedcom file.
It works ok until I try to save it using save_gedcom() - I get only an empty output file ( 0 bytes).
I assume I have to open a file using open( filename, "w"), then pass it to save_gedcom.
However I get an empty file ( 0 bytes). Is this supposed to work?
It does not even work when I try to save the "original", i.e. non-modified gedcom file, such as in the code below.

`file_in = "/home/xy/test1.ged"
file_out = "/home/xy/test1_out2.ged"

from gedcom.element.individual import IndividualElement
from gedcom.element.object import ObjectElement
from gedcom.parser import Parser

gedcom_parser = Parser()
gedcom_parser.parse_file(file_in)

outfile = open( file_out, "w" )
gedcom_parser.save_gedcom(outfile)
outfile.close()`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions