Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special case or invalid file? #17

Closed
FlominatorTM opened this issue May 8, 2018 · 4 comments
Closed

Special case or invalid file? #17

FlominatorTM opened this issue May 8, 2018 · 4 comments
Labels

Comments

@FlominatorTM
Copy link

FlominatorTM commented May 8, 2018

  • GEDCOM Utilities version: 0.1.13
  • Python version: 3.6.1
  • Operating System: Microsoft Windows [Version 10.0.16299.371]

Description

I tried importing the file in this file that was generated by https://github.com/freeseek/getmyancestors/ with the result below:

ERROR: ged2doc.cli (cli.py:232) -- caught exception: Invalid syntax at line 400: b''' Traceback (most recent call last): File "c:\program files (x86)\python36-32\lib\site-packages\ged2doc\cli.py", line 230, in main writer.save() File "c:\program files (x86)\python36-32\lib\site-packages\ged2doc\writer.py", line 111, in save for indi in reader.records0('INDI'): File "c:\program files (x86)\python36-32\lib\site-packages\ged4py\parser.py", line 278, in records0 for offset, xtag in self.index0: File "c:\program files (x86)\python36-32\lib\site-packages\ged4py\parser.py", line 171, in index0 self._init_index() File "c:\program files (x86)\python36-32\lib\site-packages\ged4py\parser.py", line 196, in _init_index for gline in self.gedcom_lines(self._bom_size): File "c:\program files (x86)\python36-32\lib\site-packages\ged4py\parser.py", line 259, in gedcom_lines "{0}: {1}'".format(lineno, line))
ged4py.parser.ParserError: Invalid syntax at line 400: b''' ERROR: ged2doc.cli (cli.py:233) -- Error while producing a document: Invalid syntax at line 400: b'''

Now the question is if the file even has valid syntax.

What I Did

getmyancestors.py -a 2 -i KF68-TC5 -o reprod.ged -v
ged2doc reprod.ged output.odt
@andy-slac
Copy link
Contributor

The GEDCOM file is certainly broken, here is the record that ged2doc complains about:

0 @S26@ SOUR 
1 TITL LDS Film #0997667, #0997678, 
1 AUTH BIRTH:

1. LDS Film #0997667, Church Records (St. Maria Catholic Church), Kappelwindeck, Buehl, Baden, Germany, Vol. #3, Page 135.

BAPTISM:

2. LDS Film #0997667, Church Records (St. Maria Catholic Church), Kappelwindeck, Buehl, Baden, Germany, Vol. #3, Page 135.

DEATH:

3. Catholic Church Buehlertal, Baden, Germany, LDS Film #0997678, Church Records (St. Michael Catholic Church), Buehlertal, Baden, Germany, Vol. #2, Page 162, #13, .
Source Media Type: Microfilm.
""In Schonbuech on 15 April 1803, died is Adam Reith, spouse of Catharina Krauss, juryman in Schonbuech, 70 years, with sacraments of Eucharist and Extreme Unction provided. He was buried on 17 April 1803 in the parish Valle Buehlensis cemetery."."

BURIAL:

4. Catholic Church Buehlertal, Baden, Germany, LDS Film #0997678, Church Records (St. Michael Catholic Church), Buehlertal, Baden, Germany, Vol. #2, Page  162, #13, .
Source Media Type: Microfilm.

1 NOTE @N6@
1 REFN 9ZZB-CRH

It looks like AUTH record contains unprotected newlines which are stored verbatim. This needs to be stored using CONC/CONT GEDCOM tags. Please forward this to getmyancestors.

@andy-z
Copy link
Owner

andy-z commented May 10, 2018

I'm going to close this issue, the error happens because input file has invalid structure. Error message tells the line number in the input file and this should be enough to track error. Still the error message itself is a bit unwieldy, I'll open a separate to try to improve diagnostics for cases like this.

@andy-z andy-z closed this as completed May 10, 2018
@andy-z andy-z added the invalid label May 10, 2018
@FlominatorTM
Copy link
Author

Thanks for the feedback, I forwarded it

@Linekio
Copy link

Linekio commented May 12, 2018

@FlominatorTM
Please try this version : https://github.com/Linekio/getmyancestors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants