1988, 1989 still bad

This commit is contained in:
Philip Sargent 2021-05-09 00:55:37 +01:00
parent 39cd616c90
commit e42cb582c7
3 changed files with 17 additions and 9 deletions

View File

@ -353,12 +353,19 @@ def Parseloghtml01(year, expedition, txt):
try: try:
tripdate, triptitle, trippeople = tripheader.split("|") tripdate, triptitle, trippeople = tripheader.split("|")
except: 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) DataIssue.objects.create(parser='logbooks', message=message)
logdataissues[tid]=message logdataissues[tid]=message
print(message) print(message)
try:
tripdate, triptitle = tripheader.split("|") tripdate, triptitle = tripheader.split("|")
trippeople = "anon" 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}") #print(f" #3 - tid: {tid}")
ldate = ParseDate(tripdate.strip(), year) ldate = ParseDate(tripdate.strip(), year)
#print(f" # - tid: {tid} <{tripdate}> <{triptitle}> <{trippeople}>") #print(f" # - tid: {tid} <{tripdate}> <{triptitle}> <{trippeople}>")
@ -639,7 +646,7 @@ def LoadLogbooks():
if len(expos) <= 1: if len(expos) <= 1:
print(" ! No expeditions found. Load 'people' first.\n") print(" ! No expeditions found. Load 'people' first.\n")
nologbook = ["1976", "1977", "1978", "1979", "1980", "1981", 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 "1986", "2020",] #no expo
entries = {"2021": 0, "2019": 20, "2018": 74, "2017": 60, "2016": 81, "2015": 79, 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, "2014": 65, "2013": 51, "2012": 75, "2011": 68, "2010": 22, "2009": 52,

View File

@ -41,6 +41,7 @@
<a href="{% url "dataissues" %}">Data Issues</a> | <a href="{% url "dataissues" %}">Data Issues</a> |
<a href="/handbook/computing/todo-data.html">tasks to do </a> | <a href="/handbook/computing/todo-data.html">tasks to do </a> |
<a id="cavesLink" href="{% url "caveindex" %}">caves</a> | <a id="cavesLink" href="{% url "caveindex" %}">caves</a> |
<a id="entsLink" href="{% url "eastings" %}">ents</a> |
<a id="folklink" href="/folk">expoers</a> | <a id="folklink" href="/folk">expoers</a> |
<a id="caversLink" href="{% url "notablepersons" %}">survey lengths</a> | <a id="caversLink" href="{% url "notablepersons" %}">survey lengths</a> |
<a href="{% url "stats" %}">statistics</a> | <a href="{% url "stats" %}">statistics</a> |

View File

@ -39,7 +39,7 @@ which is vital to writing code for the webapp. So the URL dispatch is declarativ
The API urls return TSV or JSON and are new in July 2020. The API urls return TSV or JSON and are new in July 2020.
""" """
todo = '''Replace most re_path() with modern and simpler path() todo = '''Replace most re_path() with modern and simpler path(). Test VERY CAREFULLY for each chnage. It is fragile.
''' '''
# Many of these patterns do not work because troggle spent many years broken and we have # Many of these patterns do not work because troggle spent many years broken and we have
@ -115,7 +115,6 @@ trogglepatterns = [
re_path(r'^newcave/$', caves.edit_cave, name="newcave"), re_path(r'^newcave/$', caves.edit_cave, name="newcave"),
re_path(r'^cave/3d/(?P<cave_id>[^/]+)$', caves.cave3d, name="cave3d"), re_path(r'^cave/3d/(?P<cave_id>[^/]+)$', caves.cave3d, name="cave3d"),
re_path(r'^cave/entrance/([^/]+)/?$', caves.caveEntrance),
re_path(r'^cave/description/([^/]+)/?$', caves.caveDescription), re_path(r'^cave/description/([^/]+)/?$', caves.caveDescription),
re_path(r'^cave/(?P<cave_id>[^/]+)/?$', caves.cave, name="cave"), re_path(r'^cave/(?P<cave_id>[^/]+)/?$', caves.cave, name="cave"),
re_path(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent), # view_caves.ent re_path(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent), # view_caves.ent
@ -124,8 +123,9 @@ trogglepatterns = [
# Note that urls eg '1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage' # Note that urls eg '1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage'
# Entrances # Entrances
re_path(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', caves.edit_entrance, name = "editentrance"), re_path(r'^cave/entrance/([^/]+)/?$', caves.caveEntrance), # lists all entrances
re_path(r'^entrance/new/(?P<caveslug>[^/]+)$', caves.edit_entrance, name = "newentrance"), re_path(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', caves.edit_entrance, name = "editentrance"), #edit existing entrance
re_path(r'^entrance/new/(?P<caveslug>[^/]+)$', caves.edit_entrance, name = "newentrance"), # new entrance for a cave
# System admin and monitoring # System admin and monitoring
path('statistics', statistics.stats, name="stats"), path('statistics', statistics.stats, name="stats"),