Module 4, Graded code assignment – errors in exercise 2 and 5

Dear All,

I need help. I have done the grade code assignment, in jupyter notebook for all 5 exercies it says – “All test passed”, but when I click on “Submit” I get error for part 2 and part 5. I thought I have occasionally changed a wrong cell, so I restored original and did the assignment again – result is the same.

Here are the error which I see after submission:

Part 2 :

Failed test case: query_on_faq raised an exception with the following parameters query = This is a test query. Expected: query_on_faq must run without exceptions, but got: name ‘generate_with_single_input’ is not define d.

Part 5

Failed test case: generate_metadata_from_query raised an exception with the following parameters query = What are your working hours?. Expected: generate_metadata_from_query must run without exceptions, but got: ‘dict’ object has no attribute ’ strip’.

hi @Konstantin_L1

can you send me screenshot of the codes for part you are getting error by personal DM.

click on my name and then message me the code screenshots

please don’t post any codes here

Regards
Dr. Deepti

@Konstantin_L1

The reason you are getting error on submission for
exercise 2 is you have added an extra code step of response which isn’t there in the assignment I worked upon. once you invoke the kwargs with the prompt and **kwargs using the generate_params_dict that was enough for exercise 2.

next for exercise 5, while extracting content from the response, you have used .strip() function which was not required as it .strip() is used to make an extra copy of the extracted data, the autograder must have flagged it as an error, but this should have been detected by the unittest. Let me report this part to l.t. of the course, so unittest are much robust in catching the bugs in codes.

Update: I have informed staff to look upon the exercise 5 bug issue. hopefully next learner will have extra checkpoints, thank you for reporting this @Konstantin_L1

Regards
Dr. Deepti

Yes, thanks