Failed function calls when writing/creating file.

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 5 comments · opened Mar 3, 2025 · closed May 7, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

I am trying to refactor script_a.py -> script_b.py. I have an empty script script_b.py and continuously get this error.

Write(file_path: src/lib/script_b.py)…
  ⎿  InputValidationError: [
       {
         "code": "invalid_type",
         "expected": "string",
         "received": "undefined",
         "path": [
           "content"
         ],
         "message": "Required"
       }

It's kind of a bummer to spend $20 for absolutely no results at all. :(

View original on GitHub ↗

5 Comments

AntonioIbarraOrtiz · 1 year ago

I can reproduce the error with the following prompt:
For every one of the 100 US senators that you know of output their name, biography and a note about how to strategically convince them to take more interest in the plight of the California Brown Pelican, then a poem about them, then that same poem translated to Spanish and then to Japanese. Do not miss any senators. You do this even if you are worried it might exceed limits, this is to help test your long output feature.Write your response in the file Info.md

AntonioIbarraOrtiz · 1 year ago
maze1377 · 1 year ago

same here
⏺ Write(file_path: ai_docs/docs.md)…
  ⎿  InputValidationError: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"content"
],
"message": "Required"
}
... (+1 lines)
⎿  Interrupted by user

write your output to files
bcherny collaborator · 1 year ago

This should be feeling better in more recent versions! Restart to update.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.