VisionEval/VisionEval-Dev

Strip trailing spaces from certain fields when reading input files

Opened this issue · 0 comments

A hard-to-see error will occur if an azone, bzone or marea file has trailing spaces on the Geo column. The current csv input leaves the content of that field untouched and then reports an error on the zone input saying that it does not exist. You'll see an error message in the Log like this:

Input file error for module 'CreateHouseholds' for input file 'azone_hh_pop_by_age.csv'.
Is missing inputs for the following Year/Azone combinations: 2019/BRAZORIA, 2019/FORT BEND, 2045/BRAZORIA, 2045/FORT BEND

The longer term fix will be to strip trailing spaces from the Geo column (and maybe any text column) both when the geo.csv file is loaded and when any input file with a Geo column is loaded.

The workaround is to open the offending input file with your favorite text editor and look for trailing spaces that may have crept into the Geo column and remove them. The sample error above had text like this:

BRAZORIA ,2019 ...
FORT BEND ,2019 ...

But it should have had this:
BRAZORIA,2019
FORT BEND,2019 ...