Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Application Crashes on list Command You can observe this bug by starting the application using the example code in the main execution loop of the
Application Crashes on list Command
You can observe this bug by starting the application using the example code in the main execution loop of the app.py file.
python app.py
Once, the application is up and running, you simply need to repeatedly invoke the list command, eg:
What would you like to do l
Shopping list with items has been created.
What would you like to do l
Shopping list with items has been created.
What would you like to do l
Traceback most recent call last:
File shoppingappprototypeoriginalapppy line in
app.run
File shoppingappprototypeoriginalapppy line in run
self.executecommandcmd
File shoppingappprototypeoriginalapppy line in executecommand
self.shoppinglist.refreshitempoolself.items
File shoppingappprototypeoriginalshoppinglistpy line in refresh
raise InvalidShoppingListSizeError
errors.InvalidShoppingListSizeError: Invalid List Size!
Your task is to figure out what is the cause of this occasional error and fix the application so that it works as expected. Note that you are not allowed to modify the intended behavior of the application. You need to understand why and when the error happens and make the change to the code so that the application no longer crashes upon the invocation of the list command. However, any changes in excess to that will result in you obtaining the score of even if the error no longer occurs.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started