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

zero values not permitted in the "number_of_people_per_household" column #27

Open
shakythesherpa opened this issue Feb 13, 2017 · 0 comments

Comments

@shakythesherpa
Copy link

When we have a dataset with an override column for "number_of_people_per_household" and some of the values in the column are zeroes then we get the following error:

Running electrificationplanner
Reading input from /home/mr/modelrunner/worker_data/032f9377-3ba3-4444-8ad2-8eee90b39d74/input
~/infrastructure-planning ~/modelrunner
estimate_population
estimate_population_profile
estimate_consumption_from_connection_type
Traceback (most recent call last):
File "estimate_electricity_cost_by_technology_from_population.py", line 300, in
], x.parse_args().dict, FULL_KEYS)
File "/home/mr/infrastructure-planning/infrastructure_planning/macros.py", line 57, in load_and_run
run(main_functions, g)
File "/home/mr/infrastructure-planning/infrastructure_planning/macros.py", line 138, in run
node_d.update(compute(f, l, g))
File "/home/mr/infrastructure-planning/infrastructure_planning/macros.py", line 188, in compute
value_by_key = rename_keys(compute_raw(f, l, g) or {}, prefix=prefix)
File "/home/mr/infrastructure-planning/infrastructure_planning/macros.py", line 205, in compute_raw
return f(**merge_dictionaries(g, l))
File "/home/mr/infrastructure-planning/infrastructure_planning/electricity/consumption/linear.py", line 25, in estimate_consumption_from_connection_type
estimated_household_connection_count_by_year)
File "/home/mr/infrastructure-planning/infrastructure_planning/electricity/consumption/linear.py", line 135, in _get_connection_count_by_year
year_index = estimated_household_connection_count_by_year.index
AttributeError: 'int' object has no attribute 'index'
~/modelrunner

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