VisionEval / VisionEval-Dev

Development version of VisionEval framework
https://visioneval.github.io/
Apache License 2.0
6 stars 32 forks source link

Strip trailing spaces from certain fields when reading input files #158

Open jrawbits opened 2 years ago

jrawbits commented 2 years ago

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 ...