Skip to content

Commit

Permalink
Merge pull request #19 from wmo-im/bug-fix
Browse files Browse the repository at this point in the history
bug fix: reading station_list with empty line causes error.
  • Loading branch information
david-i-berry authored Mar 17, 2023
2 parents c93a352 + 14dff36 commit dfbcfde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synop2bufr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from csv2bufr import BUFRMessage
from pymetdecoder import synop

__version__ = '0.4.dev0'
__version__ = '0.3.2'

LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -1077,6 +1077,8 @@ def transform(data: str, metadata: str, year: int,
metadata_dict = {}
tsi_mapping = {}
for row in reader:
if len(row) == 0:
continue
single_row = dict(zip(col_names, row))
tsi = single_row['traditional_station_identifier']
try:
Expand Down

0 comments on commit dfbcfde

Please sign in to comment.