diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-09 00:55:37 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-09 00:55:37 +0100 |
commit | e42cb582c7ef32dc3163731a4f7ccae7f4529a98 (patch) | |
tree | 512440da65a442d385fe3ee9e45752d2e4063c95 /parsers/logbooks.py | |
parent | 39cd616c903b2fc0651e3258b26ba03ac4394d9d (diff) | |
download | troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.tar.gz troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.tar.bz2 troggle-e42cb582c7ef32dc3163731a4f7ccae7f4529a98.zip |
1988, 1989 still bad
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py index ee76465..6be21fa 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -353,12 +353,19 @@ def Parseloghtml01(year, expedition, txt): try: tripdate, triptitle, trippeople = tripheader.split("|") except: - message = f" ! - Fail to split out date|title|people. trip:<{tid}> '{tripheader.split('|')}'" + message = f" ! - Fail 3 to split out date|title|people. trip:<{tid}> '{tripheader.split('|')}'" DataIssue.objects.create(parser='logbooks', message=message) logdataissues[tid]=message print(message) - tripdate, triptitle = tripheader.split("|") - trippeople = "anon" + try: + tripdate, triptitle = tripheader.split("|") + trippeople = "GUESS ANON" + except: + message = f" ! - Skipping logentry {year} Fail 2 to split out date|title (anon). trip:<{tid}> '{tripheader.split('|')}' CRASHES MySQL !" + DataIssue.objects.create(parser='logbooks', message=message) + logdataissues[tid]=message + print(message) + break #print(f" #3 - tid: {tid}") ldate = ParseDate(tripdate.strip(), year) #print(f" # - tid: {tid} <{tripdate}> <{triptitle}> <{trippeople}>") @@ -639,7 +646,7 @@ def LoadLogbooks(): if len(expos) <= 1: print(" ! No expeditions found. Load 'people' first.\n") nologbook = ["1976", "1977", "1978", "1979", "1980", "1981", - "1987", "1988", "1989", # breaks mysql with db constraint fail - debug locally first + # "1987", "1988", "1989", # breaks mysql with db constraint fail - debug locally first "1986", "2020",] #no expo entries = {"2021": 0, "2019": 20, "2018": 74, "2017": 60, "2016": 81, "2015": 79, "2014": 65, "2013": 51, "2012": 75, "2011": 68, "2010": 22, "2009": 52, |