diagnosing missing entrance file

This commit is contained in:
2022-12-22 00:56:46 +00:00
parent a7a126dd55
commit f23764c486
4 changed files with 15 additions and 7 deletions

View File

@@ -63,6 +63,13 @@ def import_survex():
with transaction.atomic():
troggle.parsers.survex.LoadPositions()
def import_ents():
# when this import is moved to the top with the rest it all crashes horribly
print(" - Survex entrances x/y/z Positions")
with transaction.atomic():
import troggle.parsers.survex
troggle.parsers.survex.LoadPositions()
def import_loadpos():
# when this import is moved to the top with the rest it all crashes horribly
import troggle.parsers.survex

View File

@@ -69,13 +69,14 @@ class MapLocations(object):
def points(self):
for ent in Entrance.objects.all():
if ent.best_station():
print(f"{ent.filename}", end=", ")
try:
k = ent.caveandentrance_set.all()[0].cave
except:
message = f" ! Failed to get Cave linked to Entrance:{ent.name} from:{ent.filename} best:{ent.best_station()}"
message = f" ! Failed to get Cave linked to Entrance:{ent.name} from:{ent.filename} best:{ent.best_station()} {ent.caveandentrance_set.all()}"
DataIssue.objects.create(parser='entrances', message=message)
print(message)
raise
continue # skip this entrance
try:
areaName = k.getArea().short_name
except: