|
|
|
@ -21,7 +21,6 @@ for hus_name in next(os.walk(BASEDIR))[1]: |
|
|
|
|
|
|
|
|
|
cards = [] |
|
|
|
|
all_txts = sorted(glob.glob(f"{BASEDIR+hus_name}/**/*.TXT", recursive=True)) |
|
|
|
|
#print(all_txts) |
|
|
|
|
for txt in all_txts: |
|
|
|
|
|
|
|
|
|
card, year, month = os.path.split(txt)[1].split('.')[0].split('-') |
|
|
|
@ -103,6 +102,8 @@ for hus_name in next(os.walk(BASEDIR))[1]: |
|
|
|
|
# Sometimes, some of the lines in a file are the wrong size. |
|
|
|
|
# When that happens, we skip the file. |
|
|
|
|
if len(data[-1]) != len(col_names): |
|
|
|
|
print(" - Invalid file format; SKIPPING!") |
|
|
|
|
print(f" - Expected cols: {len(col_names)}; Found cols: {len(data[-1])}") |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
placeholder = f"({','.join('?' for _ in range(len(data[0])))})" |
|
|
|
|