Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jrawbits opened this issue Nov 2, 2021 · 0 comments
Open

Comments

@jrawbits
Copy link
Collaborator

jrawbits commented Nov 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant