# ValueError: expected '}' before end of string

**URL:** <https://community.crewai.com/t/valueerror-expected-before-end-of-string/782>\
**Category:** CrewAI Community Support\
**Tags:** crewai\
**Created:** [October 14, 2024, 1:06pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782 "2024-10-14T13:06:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandburner](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@brandburner](https://community.crewai.com/u/brandburner)\
**Post date:** [October 14, 2024, 1:06pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/1 "2024-10-14T13:06:07Z")

</div>

Trying to get crewai running on my local machine. The default demo project ran fine, but whenever i try to edit it or try another example from thew crewai-examples repo I get a similar error:

```auto
% crewai run                
Running the Crew
Traceback (most recent call last):
  File "/Users/mike/Documents/crewai_hacking/bin/run_crew", line 6, in <module>
    sys.exit(run())
             ^^^^^
  File "/Users/mike/Documents/latest_ai_development/src/latest_ai_development/main.py", line 21, in run
    LatestAiDevelopmentCrew().crew().kickoff(inputs=inputs)
  File "/Users/michaelatherton/Documents/crewai_hacking/lib/python3.12/site-packages/crewai/crew.py", line 463, in kickoff
    self._interpolate_inputs(inputs)
  File "/Users/mike/Documents/crewai_hacking/lib/python3.12/site-packages/crewai/crew.py", line 939, in _interpolate_inputs
    task.interpolate_inputs(
  File "/Users/mike/Documents/crewai_hacking/lib/python3.12/site-packages/crewai/task.py", line 307, in interpolate_inputs
    self.description = self._original_description.format(**inputs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: expected '}' before end of string
An error occurred while running the crew: Command '['poetry', 'run', 'run_crew']' returned non-zero exit status 1.

```

Guessing this is my rookie error with a local install but can anyone advise? thanks!

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [October 14, 2024, 1:08pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/2 "2024-10-14T13:08:17Z")

</div>

will need to see your code, if you can show it

---

<div class="post-metadata">

**Author:** ![brandburner](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@brandburner](https://community.crewai.com/u/brandburner)\
**Post date:** [October 14, 2024, 1:16pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/3 "2024-10-14T13:16:03Z")

</div>

I was trying to run the example here:

> **[crewAI-examples/write\_a\_book\_with\_flows at main · crewAIInc/crewAI-examples](https://github.com/crewAIInc/crewAI-examples/tree/main/write_a_book_with_flows)**
>
> A collection of examples that show how to use CrewAI framework to automate workflows. - crewAIInc/crewAI-examples

---

<div class="post-metadata">

**Author:** ![rokbenko](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rokbenko/32/492_2.png) [@rokbenko](https://community.crewai.com/u/rokbenko)\
**Post date:** [October 14, 2024, 2:20pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/4 "2024-10-14T14:20:15Z")

</div>

@brandburner You forgot to add the closing `}` somewhere in your code or you unintentionally deleted it.

Inputs can be used with agents and tasks as follows:

> Gather comprehensive information about {topic} and {chapter\_title} that will be used to enhance the content of the chapter. Here is some additional information about the author’s desired goal for the book and the chapter:\n\n {goal} Here is the outline description for the chapter:\n\n {chapter\_description}

I tested that with intentionally deleting the closing `}` of an input in my `tasks.yaml` file of some CrewAI project (i.e., not the one you posted the link for), and I got the identical error:

> ValueError: expected ‘}’ before end of string

---

<div class="post-metadata">

**Author:** ![brandburner](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@brandburner](https://community.crewai.com/u/brandburner)\
**Post date:** [October 15, 2024, 5:40pm UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/5 "2024-10-15T17:40:51Z")

</div>

That’s super helpful thanks! I can’t spot it so I think I’ll reinstall and start again 🙂

---

<div class="post-metadata">

**Author:** ![rokbenko](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rokbenko/32/492_2.png) [@rokbenko](https://community.crewai.com/u/rokbenko)\
**Post date:** [October 16, 2024, 8:36am UTC](https://community.crewai.com/t/valueerror-expected-before-end-of-string/782/6 "2024-10-16T08:36:39Z")

</div>

@brandburner If I were you, I would simply ask ChatGPT if he can spot any mistakes, but guide him with adding that there should be `}` missing somewhere in your code.
