Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
