Getting this error for Agentic AI - DeepLearning.AI Unit 3
It looks like Python cannot find a .env file in the directory where your notebook is running. The .env file is where your OpenAI API key should be stored, and load_dotenv() expects to find it in the current working directory.
If you are running the notebook on your local machine or in a separate environment (e.g., Colab, VS Code), the .env file that the course provides will not exist automatically. You’ll need to create your own .env file in the same directory as the notebook and add your OpenAI API key.
1 Like
