Skip to content

Commit bb4c438

Browse files
committed
workflow update
1 parent 74c9b6c commit bb4c438

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ jobs:
113113
try:
114114
with z.open(rname) as rf:
115115
txt = io.TextIOWrapper(rf, encoding='utf-8', errors='replace')
116-
routes = list(csv.DictReader(txt))
116+
reader = csv.DictReader(txt)
117+
# Remove BOM from header names if present
118+
if reader.fieldnames:
119+
reader.fieldnames = [fn.lstrip('\ufeff') for fn in reader.fieldnames]
120+
routes = list(reader)
117121
except Exception as e:
118122
msg = f'Failed to read routes.txt for {aid}: {e}'
119123
print('ERROR -', msg)
@@ -218,7 +222,11 @@ jobs:
218222
try:
219223
with z.open(rname) as rf:
220224
txt = io.TextIOWrapper(rf, encoding='utf-8', errors='replace')
221-
routes = list(csv.DictReader(txt))
225+
reader = csv.DictReader(txt)
226+
# Remove BOM from header names if present
227+
if reader.fieldnames:
228+
reader.fieldnames = [fn.lstrip('\ufeff') for fn in reader.fieldnames]
229+
routes = list(reader)
222230
except Exception as e:
223231
msg = f'Failed to read routes.txt for {agency}: {e}'
224232
print(f'Agency {agency}: ERROR - {msg}')

0 commit comments

Comments
 (0)