Doriandarko / claude-engineer

Claude Engineer is an interactive command-line interface (CLI) that leverages the power of Anthropic's Claude-3.5-Sonnet model to assist with software development tasks. This tool combines the capabilities of a large language model with practical file system operations and web search functionality.
9.66k stars 1.02k forks source link

fix crash when using create_files tool #204

Open j4ys0n opened 1 day ago

j4ys0n commented 1 day ago

claude-engineer kept crashing with the following error

An unexpected error occurred: string indices must be integers
2024-11-27 11:18:18,080 - ERROR - Unexpected error: string indices must be integers
Traceback (most recent call last):
  File "/Users/user/Code/claude-engineer/main.py", line 2228, in <module>
    asyncio.run(main())
  File "/Users/user/miniconda3/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/user/miniconda3/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/user/Code/claude-engineer/main.py", line 2217, in main
    response, _ = await chat_with_claude(user_input)
  File "/Users/user/Code/claude-engineer/main.py", line 1873, in chat_with_claude
    file_contents[file['path']] = file['content']
TypeError: string indices must be integers
Program finished. Goodbye!