Write To File command does not work
Closed this issue · 1 comments
maxiy01 commented
Description
When my agent tries to use wrte to file command it fails to parse arguments.
Docker log:
2024-09-25 01:03:14 2024-09-25 01:03:14,772 | WARNING | Failed to parse command arguments: {"filename": "game.py", "text": "#!/usr/bin/env python\n\nimport random\nimport time\n\n# Game constants\nWIDTH = 10\nHEIGHT = 20\nSHAPES = [\n # ... (define your shapes here
2024-09-25 01:03:14 2024-09-25 01:03:14,772 | INFO | Command to execute: Write to File
2024-09-25 01:03:14 2024-09-25 01:03:14,772 | INFO | Command Args: {}
2024-09-25 01:03:14 2024-09-25 01:03:14,905 | INFO | NewAgent: [ACTIVITY] Executing command `Write to File` with args `{}`.
2024-09-25 01:03:14 2024-09-25 01:03:14,935 | INFO | Executing command: Write to File with args: {}. Command Function: <function file_system.write_to_file at 0x7f587e501c60>
2024-09-25 01:03:14 2024-09-25 01:03:14,937 | INFO | Command Output: Error: argument of type 'NoneType' is not iterable
2024-09-25 01:03:15 2024-09-25 01:03:15,041 | INFO | NewAgent: [ACTIVITY] **Executed Command:** `Write to File` with the following parameters:
2024-09-25 01:03:15 ```json
2024-09-25 01:03:15 {
2024-09-25 01:03:15 "filename": null,
2024-09-25 01:03:15 "text": null
2024-09-25 01:03:15 }
2024-09-25 01:03:15 ```
2024-09-25 01:03:15
2024-09-25 01:03:15 **Command Output:**
2024-09-25 01:03:15 ```
2024-09-25 01:03:15 Error: argument of type 'NoneType' is not iterable
2024-09-25 01:03:15 ```
Actual Kobold output:
Output: #execute("Write to File", {"filename": "game.py", "text": "#!/usr/bin/env python\n\nimport random\nimport time\n\n# Game constants\nWIDTH = 10\nHEIGHT = 20\nSHAPES = [\n # ... (define your shapes here)\n]\n\n# Game classes\nclass TetrisGame:\n # ... (define your game class here)\n\n# Game functions\ndef new_shape():\n # ... (define your new_shape function here)\n\n# Game loop\ngame = TetrisGame()\n\nwhile True:\n # ... (define your game loop here)\n\n# Game over\nprint(\"Game over!\")\n"})
#execute("Execute Python File", {"file": "game.py"})
Operating System
- Linux
- Windows
- MacOS
Acknowledgements
- I am NOT trying to use localhost for providers running outside of the docker container.
- I am NOT trying to run AGiXT outside of docker, the only supported method to run it.
- Python 3.10.X is installed and the version in use on the host machine.
- The latest version of Docker is installed and running on the host machine.
- I am using the latest stable version of AGiXT.
- I have provided enough information for the maintainers to reproduce and diagnose the issue.
- I have searched the existing issues to make sure this bug has not been reported yet.
Josh-XT commented
Hello! I believe this has been resolved. Please let me know if issues are ongoing in the latest release.