ValueError: expected '}' before end of string

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:

% 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!

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

I was trying to run the example here:

@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

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

@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.