Where is utils that is used in L7_student notebook

I am running the code locally. It runs fine on the notebook that is provided with the lesson on line.

Looks like I need a module called “utils” and maybe something that needs to sit two levels above where my notebook is point to to satisfy

sys.path.append(‘…/…’)
import utils

Thanks
Mho

Step 1: Input passed moderation check.

AttributeError Traceback (most recent call last)
Cell In[4], line 76
73 return neg_str, all_messages
75 user_input = “tell me about the smartx pro phone and the fotosnap camera, the dslr one. Also what tell me about your tvs”
—> 76 response,_ = process_user_message(user_input,)
77 print(response)

Cell In[4], line 14, in process_user_message(user_input, all_messages, debug)
10 return “Sorry, we cannot process this request.”
12 if debug: print(“Step 1: Input passed moderation check.”)
—> 14 category_and_product_response = utils.find_category_and_product_only(user_input, utils.get_products_and_category())
15 #print(print(category_and_product_response)
16 # Step 2: Extract the list of products
17 category_and_product_list = utils.read_string_to_list(category_and_product_response)

AttributeError: module ‘utils’ has no attribute ‘find_category_and_product_only’
</error message>

I’m not a mentor for that course, so I can’t answer directly.

But in general, if the assignment uses a Jupyter notebook, you can use the Files menu to find the other assets that the notebook uses.

Yes, that works.

Thanks for your help.

Mho

I’m also not a mentor for any of the short courses, but if the notebooks work the same way there as they do in MLS and DLS and so forth, there is an easy way to create a “zip” file with all the files you need for a given assignment. Please see this thread.