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

create-character fails if no armor option is selected #25

Open
geckon opened this issue Aug 12, 2019 · 0 comments
Open

create-character fails if no armor option is selected #25

geckon opened this issue Aug 12, 2019 · 0 comments

Comments

@geckon
Copy link
Contributor

geckon commented Aug 12, 2019

Traceback (most recent call last):
  File "/home/theger/tmp/dungeon-sheets/venv/bin/create-character", line 11, in <module>
    sys.exit(main())
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/dungeonsheets/create_character.py", line 732, in main
    my_app.run()
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
    return_code = call_function(_SCREEN)    
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
    return self.main()
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/apNPSApplicationManaged.py", line 172, in main
    self._THISFORM.edit()
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/npyscreen/fmActionForm.py", line 77, in edit
    self.edit_return_value = self.on_ok()
  File "/home/theger/tmp/dungeon-sheets/venv/lib64/python3.6/site-packages/dungeonsheets/create_character.py", line 632, in on_ok
    my_armor = self.armor.get_selected_objects()[0]
IndexError: list index out of range

Either selecting one option (e.g. "no armor") should be enforced, or one of the options should be made default, or at least this should fail gracefully.

This was referenced Apr 25, 2020
PJBrs added a commit to PJBrs/dungeon-sheets that referenced this issue Jun 30, 2024
PJBrs added a commit to PJBrs/dungeon-sheets that referenced this issue Jul 1, 2024
PJBrs added a commit to PJBrs/dungeon-sheets that referenced this issue Jul 3, 2024
PJBrs added a commit to PJBrs/dungeon-sheets that referenced this issue Jul 7, 2024
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