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

Fix Increase Reserve Population causing an error while building a mod #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ceebox
Copy link

@Ceebox Ceebox commented Jun 26, 2024

Heyo, got this crash when I was building a mod with increase reserve population.

Traceback (most recent call last):
  File "modbuilder.py", line 4, in <module>
  File "modbuildermain.py", line 4, in main
  File "modbuilder\gui.py", line 270, in main
  File "modbuilder\mods.py", line 189, in apply_mod
  File "C:\Users\Pigeon\Desktop\modbuilder\modbuilder\plugins\increase_reserve_population.py", line 105, in process
    update_all_populations(mods.APP_DIR_PATH / "mod/dropzone/settings/hp_settings", multiply)
  File "C:\Users\Pigeon\Desktop\modbuilder\modbuilder\plugins\increase_reserve_population.py", line 100, in update_all_populations
    update_reserve_population(root, data, multiply)
  File "C:\Users\Pigeon\Desktop\modbuilder\modbuilder\plugins\increase_reserve_population.py", line 83, in update_reserve_population
    reserve_values = reduce(lambda a, b: a + b, offsets_to_change)
TypeError: reduce() of empty iterable with no initial value

I'm not exactly a keen python developer but this seemed like a simple fix. I could be an absolute moron and have not fixed this at all, but the crash has gone away for me. Hope this helps!

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

Successfully merging this pull request may close these issues.

None yet

1 participant