Ungraded Lab: Chart Generation (M2_UGL_1) - can't find utils.py module

Hi, everyone!

I can’t find the utils.py file to be imported into the lab:

Can anyone help me?

Are you using the course programming environment, or are you trying to run the lab on a different service?

to run codes you need to download all the necessary files for labs to run successfully locally which you would find when you click File==> Open section. Also you would need check module version which will be available in requirement.txt.file

I’m trying to run the lab on my computer. I created a virtual environment (venv) and downloaded all the content from the requirements.txt file, which does not include the utils module.

It’s there in the File menu.

Thank you very much! I didn’t notice that Files tab!

I have an additional question. I’m trying to run the lab on Visual Studio Code in my machine. But the code considers a Jupyter environment. Is that a problem? I have very little knowledge on AI development and want to try for myself.

You can install the Jupyter extension for VSCode.

I am also trying to set up the venv and use Jupyter notebook within VS code in my machine. After getting the Utils.py file, where to place it in the local? can anyone advise?

Try putting it in the same folder as your notebook ipynb file.

I kept the file in the same location. Now it is able to locate however i am getting a different error now. Can you please help here?

Sorry, that’s the depth of my VSCode skills.

You need to get an API KEY from OPEN AI as described in this post here: Ungraded Lab 1 (Chart Generation) utils.py api keys - Course Q&A / Agentic AI - DeepLearning.AI