Answered step by step
Verified Expert Solution
Link Copied!

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, e.g.:
What would you like to do? l
Shopping list with 2 items has been created.
What would you like to do? l
Shopping list with 3 items has been created.
What would you like to do? l
Traceback (most recent call last):
File "...\shopping-app-prototype-2\original\app.py", line 137, in
app.run()
File "...\shopping-app-prototype-2\original\app.py", line 40, in run
self.execute_command(cmd)
File "...\shopping-app-prototype-2\original\app.py", line 56, in execute_command
self.shopping_list.refresh(item_pool=self.items)
File "...\shopping-app-prototype-2\original\shoppinglist.py", line 17, 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 0 even if the error no longer occurs.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

Students also viewed these Databases questions