fix str+int, raise excels dir create err

This commit is contained in:
2025-09-12 21:39:47 +03:00
parent 4484148e8a
commit 6eccd99994

View File

@@ -100,7 +100,7 @@ def process_excel_file(facultet, excel_url, counter, timeid):
print("parsed done!") print("parsed done!")
if prs.parser_error is not None: if prs.parser_error is not None:
excel_info["parser_error_cycle_" + excel_info['stat']['cycles']] = prs.parser_error excel_info["parser_error_cycle_" + str(excel_info['stat']['cycles'])] = prs.parser_error
for group_name in prs.groups.keys(): for group_name in prs.groups.keys():
if group_name in result_groups.keys(): if group_name in result_groups.keys():
@@ -165,8 +165,9 @@ def main():
try: try:
os.mkdir(DIRNAME) os.mkdir(DIRNAME)
print(f"Directory '{DIRNAME}' created successfully.") print(f"Directory '{DIRNAME}' created successfully.")
except Exception: except Exception as e:
print(f"Directory '{DIRNAME}' already exists.") print(f"Failed create '{DIRNAME}': ")
raise e
print("main(); parse links starting...") print("main(); parse links starting...")
EXCEL_LINKS = links_parser.parse_links(FACULTETS if DEBUG_ONE_FAC is None else [DEBUG_ONE_FAC]) EXCEL_LINKS = links_parser.parse_links(FACULTETS if DEBUG_ONE_FAC is None else [DEBUG_ONE_FAC])