# M2 graded lab issue

**URL:** <https://community.deeplearning.ai/t/m2-graded-lab-issue/892704>\
**Category:** Agentic AI\
**Tags:** week-module-2, dl-ai-learning-platform\
**Created:** [June 8, 2026, 11:16am UTC](https://community.deeplearning.ai/t/m2-graded-lab-issue/892704 "2026-06-08T11:16:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![THEMVM](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/themvm/32/148121_2.png) [@THEMVM](https://community.deeplearning.ai/u/THEMVM)\
**Post date:** [June 8, 2026, 11:16am UTC](https://community.deeplearning.ai/t/m2-graded-lab-issue/892704/1 "2026-06-08T11:16:09Z")

</div>

Despite writing the correct code, i keep getting errors like this:  
**Exercise 1**

0/10

Failed test case: generate\_draft raised LLMError: An error occurred: Error code: 400 - {‘error’: {‘message’: “Invalid value for ‘content’: expected a string, got null.”, ‘type’: ‘invalid\_request\_error’, ‘param’: ‘messages.[0].content’, ‘code’: None}}.  
Expected:  
no exception,  
but got:  
An error occurred: Error code: 400 - {‘error’: {‘message’: “Invalid value for ‘content’: expected a string, got null.”, ‘type’: ‘invalid\_request\_error’, ‘param’: ‘messages.[0].content’, ‘code’: None}}.

**Exercise 2**

0/10

Failed test case: reflect\_on\_draft raised LLMError: An error occurred: Error code: 400 - {‘error’: {‘message’: “Invalid value for ‘content’: expected a string, got null.”, ‘type’: ‘invalid\_request\_error’, ‘param’: ‘messages.[0].content’, ‘code’: None}}.  
Expected:  
no exception,  
but got:  
An error occurred: Error code: 400 - {‘error’: {‘message’: “Invalid value for ‘content’: expected a string, got null.”, ‘type’: ‘invalid\_request\_error’, ‘param’: ‘messages.[0].content’, ‘code’: None}}.

**Exercise 3**

0/10

Failed test case: revise\_draft raised AttributeError: ‘NoneType’ object has no attribute ‘choices’.  
Expected:  
no exception,  
but got:  
‘NoneType’ object has no attribute ‘choices’.

---

<div class="post-metadata">

**Author:** ![reinoudbosch](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@reinoudbosch](https://community.deeplearning.ai/u/reinoudbosch)\
**Post date:** [June 8, 2026, 12:07pm UTC](https://community.deeplearning.ai/t/m2-graded-lab-issue/892704/2 "2026-06-08T12:07:45Z")

</div>

Hi THEMVM,

I cannot reproduce this error with correct content on my side. If you send me your code by means of a direct message I can have a look.

---

<div class="post-metadata">

**Author:** ![reinoudbosch](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@reinoudbosch](https://community.deeplearning.ai/u/reinoudbosch)\
**Post date:** [June 8, 2026, 12:23pm UTC](https://community.deeplearning.ai/t/m2-graded-lab-issue/892704/3 "2026-06-08T12:23:37Z")

</div>

Just to make sure: Did you save your notebook before submitting?

---

<div class="post-metadata">

**Author:** ![THEMVM](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/themvm/32/148121_2.png) [@THEMVM](https://community.deeplearning.ai/u/THEMVM)\
**Post date:** [June 8, 2026, 12:35pm UTC](https://community.deeplearning.ai/t/m2-graded-lab-issue/892704/4 "2026-06-08T12:35:07Z")

</div>

hi reinoud. i restarted the kernel and saved the notebook and it has worked now
