Linekio / getmyancestors

Get GEDCOM files from FamilySearch.org
Other
164 stars 40 forks source link

fstogedcom.py fails on AttributeError: 'Note' object has no attribute 'text' #7

Closed changeling closed 5 years ago

changeling commented 5 years ago

Ran into this. Could use advice on debugging here. Is there a way to identify which data is malformed, assuming that's the culprit? Or to locate and salvage the results in the event of such? It appears to have hung the process, with the counter continuing.

$ python fstogedcom.py
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "fstogedcom.py", line 465, in download
    loop.run_until_complete(download_stuff(loop))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "fstogedcom.py", line 461, in download_stuff
    await future
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "[...]/getmyancestors-master/getmyancestors.py", line 568, in get_contributors
    if n.text == text:
AttributeError: 'Note' object has no attribute 'text'
Linekio commented 5 years ago

Could you send me your log file ? (by email : benoitfontaine.ba@gmail.com)

changeling commented 5 years ago

Sent.

Linekio commented 5 years ago

I have not been able to reproduce the error, but I guess it's random and it comes from the fact that the programming is asynchronous and a note is added to the tree before having an attribute " text ". I created a fix : 0a0a1035f9f4c4a985069f2a914851e630e84b50

changeling commented 5 years ago

I haven't been able to reproduce, either. Sounds like a good candidate, with your fix, for closing the issue until and unless it pops up again. Thanks for looking into it.