diff --git a/parsers/survex.py b/parsers/survex.py index 29e3fff..8ba7866 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -1550,9 +1550,9 @@ class LoadingSurvex: nonlocal blockcount blockcount += 1 - if blockcount % 20 == 0: + if blockcount % 40 == 0: print(".", file=sys.stderr, end="") - if blockcount % 800 == 0: + if blockcount % 1600 == 0: print("\n", file=sys.stderr, end="") mem = get_process_memory() print(f" - MEM: {mem:7.2f} MB in use", file=sys.stderr) @@ -2186,7 +2186,7 @@ def FindAndLoadSurvex(survexblockroot): ) unseensroot = re.sub(r"\.svx$", "", UNSEENS) - excpts = ["surface/terrain", "kataster/kataster-boundaries", "template", "docs", unseensroot] + excpts = ["surface/terrain", "kataster/kataster-boundaries", "template", "docs", "deprecated", "subsections", unseensroot] removals = [] for x in unseens: for o in excpts: @@ -2202,7 +2202,8 @@ def FindAndLoadSurvex(survexblockroot): file=sys.stderr, ) check_team_cache() - print(" -- Now loading the previously-omitted survex files.", file=sys.stderr) + print(f" -- Now loading the previously-omitted survex files.", file=sys.stderr) + print(f" - (except the exceptions: {excpts})", file=sys.stderr) with open(Path(settings.SURVEX_DATA, UNSEENS), "w") as u: u.write( @@ -2498,7 +2499,11 @@ def MakeFileRoot(fn): print(f" - Making/finding a new root survexfile for this import: {fn}") fileroot = SurvexFile(path=fn, cave=cave) - fileroot.survexdirectory = SurvexDirectory.objects.get(id=1) # default + try: + fileroot.survexdirectory = SurvexDirectory.objects.get(id=1) # default + except: + fileroot.survexdirectory = None + if cave: # But setting the SurvexDirectory does work !