# Issue with Prompt Customization Example – KeyError: 'role\_playing'

**URL:** <https://community.crewai.com/t/issue-with-prompt-customization-example-keyerror-role-playing/5485>\
**Category:** CrewAI Community Support\
**Tags:** agent, crewai\
**Created:** [April 24, 2025, 2:33pm UTC](https://community.crewai.com/t/issue-with-prompt-customization-example-keyerror-role-playing/5485 "2025-04-24T14:33:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simone\_russo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/simone_russo/32/3485_2.png) [@simone\_russo](https://community.crewai.com/u/simone_russo)\
**Post date:** [April 24, 2025, 2:33pm UTC](https://community.crewai.com/t/issue-with-prompt-customization-example-keyerror-role-playing/5485/1 "2025-04-24T14:33:38Z")

</div>

Hi everyone,

While going through the official CrewAI documentation, I followed the example on basic prompt customization: [Customizing Prompts - CrewAI](https://docs.crewai.com/guides/advanced/customizing-prompts#example%3A-basic-prompt-customization)

When I tried running the code, I got this error:

```
File "C:\Users\s.russo\Desktop\multi-agent\.venv\Lib\site-packages\crewai\utilities\i18n.py", line 51, in retrieve
    return self._prompts[kind][key]
           ~~~~~~~~~~~~~~~~~~~ ^^^^^
KeyError: 'role_playing'

```

Is it correct to assume that in order for this to work, I need to provide a JSON file that includes all the expected keys—like the one here? [crewAI/src/crewai/translations/en.json at main · crewAIInc/crewAI · GitHub](https://github.com/crewAIInc/crewAI/blob/main/src/crewai/translations/en.json)

Or am I missing a simpler way to handle this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![tonykipkemboi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tonykipkemboi/32/4070_2.png) [@tonykipkemboi](https://community.crewai.com/u/tonykipkemboi)\
**Post date:** [April 24, 2025, 2:46pm UTC](https://community.crewai.com/t/issue-with-prompt-customization-example-keyerror-role-playing/5485/2 "2025-04-24T14:46:45Z")

</div>

Yes, you’re right. You would need to have it in a JSON file.
