mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
fix: remove duplicate LaTeX imports, add row bounds safety, improve error messaging (#252)
This commit is contained in:
@@ -189,11 +189,14 @@ def parse_sheet(ws, sheet_label=None):
|
||||
# Parse data rows
|
||||
companies = []
|
||||
for row in ws.iter_rows(min_row=header_row + 1, values_only=True):
|
||||
if not row[company_col]:
|
||||
if company_col >= len(row) or not row[company_col]:
|
||||
continue
|
||||
|
||||
company_name = str(row[company_col]).strip()
|
||||
city_name = str(row[city_col]).strip() if city_col is not None and row[city_col] else ""
|
||||
if city_col is not None and city_col < len(row) and row[city_col]:
|
||||
city_name = str(row[city_col]).strip()
|
||||
else:
|
||||
city_name = ""
|
||||
|
||||
entry = {
|
||||
"company": company_name,
|
||||
|
||||
+3
-1
@@ -22,7 +22,9 @@ def run_tool(command):
|
||||
).stdout
|
||||
except FileNotFoundError as exc:
|
||||
raise VerificationError(
|
||||
f"required command '{command[0]}' was not found; install poppler-utils"
|
||||
f"required command '{command[0]}' was not found. "
|
||||
"Install poppler-utils (macOS: brew install poppler, "
|
||||
"Debian/Ubuntu: apt install poppler-utils, Windows: choco install poppler)"
|
||||
) from exc
|
||||
except subprocess.CalledProcessError as exc:
|
||||
detail = (exc.stderr or "").strip() or (exc.stdout or "").strip()
|
||||
|
||||
Reference in New Issue
Block a user