mirror of
https://github.com/FujiwaraChoki/MoneyPrinterV2.git
synced 2026-04-26 22:55:48 +03:00
[GH-ISSUE #70] Handle Empty or Non-Integer Input Gracefully in Option Selection #55
Labels
No labels
bug
enhancement
good first issue
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/MoneyPrinterV2#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xeno852 on GitHub (Mar 19, 2024).
Original GitHub issue: https://github.com/FujiwaraChoki/MoneyPrinterV2/issues/70
There's an issue in the main menu option selection where pressing enter without inputting a value or inputting a non-integer value causes the program to crash with a ValueError. This happens because the program attempts to convert an empty string or a non-integer input directly to an integer without validation. The expected behavior would be for the program to prompt the user again for input until a valid integer that corresponds to one of the options is provided.
Steps to Reproduce:
Expected Result:
Actual Result:
This issue could be fixed by adding a loop that validates the input before attempting to convert it to an integer, ensuring robust input handling.
@FujiwaraChoki commented on GitHub (Mar 21, 2024):
Well done!