Closed DerekCL closed 1 year ago
As a note this issue most likely relates to
https://github.com/Torantulino/Auto-GPT/issues/651 https://github.com/Torantulino/Auto-GPT/issues/175
and many other type errors but this was the first time I saw the specific mention str of get
from the larger trace we can see that Failed to fix AI output started before
Error: Traceback (most recent call last): File "/home/gitderekt/Downloads/Auto-GPT/scripts/main.py", line 86, in print_assistant_thoughts assistant_thoughts = assistant_reply_json.get("thoughts", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'
happened after as well but it continued to run despite the errors
i met this issue too, it can continue to run. But it reproduce a few minutues later in console
I got stuck in an infinite loop after the error
Closing as one of many duplicate issues superseded by #1407
Duplicates
Steps to reproduce š¹
Have a start.sh script contains the following:
python scripts/main.py --gpt3only --continuous
Run in continuous mode for a while until the error occurs while monitoring the terminal
git info
commit a0f900f2dabd114f80d5e96ecc6269a744dfc99a (HEAD -> master, origin/master, origin/HEAD) Merge: 5982f29 639df44 Author: Richard Beales rich@richbeales.net Date: Wed Apr 12 21:43:35 2023 +0100
system info
OS: Pop!_OS 22.04 LTS x86_64 Kernel: 6.2.6-76060206-generic Uptime: 11 hours, 47 mins Packages: 2001 (dpkg), 11 (flatpak),
Shell: zsh 5.8.1 Resolution: 1920x1080, 1920x1080, 192 DE: GNOME 42.5 WM: Mutter WM Theme: Pop Theme: Pop-dark [GTK2/3] Icons: Pop [GTK2/3] Terminal: gnome-terminal CPU: AMD Ryzen 9 5900X (24) @ 3.700GH GPU: NVIDIA 0c:00.0 NVIDIA Corporatio Memory: 11531MiB / 64198MiB
Current behavior šÆ
Error: Traceback (most recent call last): File "/home/gitderekt/Downloads/Auto-GPT/scripts/main.py", line 86, in print_assistant_thoughts assistant_thoughts = assistant_reply_json.get("thoughts", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'
larger trace here
NEXT ACTION: COMMAND = start_agent ARGUMENTS = {'name': 'InvestmentAgent', 'task': 'Help us identify potential business models and refine our investment strategy.', 'prompt': 'Hello, I am the InvestmentAgent. How can I help you identify potential business models and refine your investment strategy?'} SYSTEM: Command start_agent returned: Agent InvestmentAgent created with key 4. First response: As an AI language model, I do not have any investment needs. However, I can provide you with advice and guidance on potential business models and investment strategies. Please let me know how I can assist you. ENTREPRENEUR-GPT THOUGHTS: Let's use the message_agent command to communicate with the InvestmentAgent and request specific recommendations for halal business models that align with our values and goals. REASONING: By requesting specific recommendations from the InvestmentAgent and recording them in a file, we can ensure that we are making informed decisions based on our goals and values. Additionally, this can help us communicate more effectively with the InvestmentAgent and ensure that we are able to track our progress over time. PLAN:
Error: Invalid JSON Now, let's use the "write_to_file" command to create a file for recording the recommendations suggested by the InvestmentAgent.
Please copy and execute the response using the "evaluate_code" command. Attempting to fix JSON by finding outermost brackets Apparently json was fixed. Error: Traceback (most recent call last): File "/home/gitderekt/Downloads/Auto-GPT/scripts/main.py", line 86, in print_assistant_thoughts assistant_thoughts = assistant_reply_json.get("thoughts", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'
Attempting to fix JSON by finding outermost brackets Apparently json was fixed. Warning: Failed to parse AI output, attempting to fix. If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly. Failed to fix AI output, telling the AI.
NEXT ACTION: COMMAND = Error: ARGUMENTS = string indices must be integers, not 'str' SYSTEM: Command Error: threw the following error: string indices must be integers, not 'str' Warning: Failed to parse AI output, attempting to fix. If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly. Failed to fix AI output, telling the AI.
Error: Invalid JSON My apologies, there was an error in the previous response. Here's a corrected version:
Now, let's use the "write_to_file" command to create a file for recording the recommendations suggested by the InvestmentAgent.
Please copy and execute the response using the "evaluate_code" command. Attempting to fix JSON by finding outermost brackets Apparently json was fixed. Error: Traceback (most recent call last): File "/home/gitderekt/Downloads/Auto-GPT/scripts/main.py", line 86, in print_assistant_thoughts assistant_thoughts = assistant_reply_json.get("thoughts", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'
Attempting to fix JSON by finding outermost brackets Apparently json was fixed. Warning: Failed to parse AI output, attempting to fix. If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly. Failed to fix AI output, telling the AI.
NEXT ACTION: COMMAND = Error: ARGUMENTS = string indices must be integers, not 'str' SYSTEM: Command Error: threw the following error: string indices must be integers, not 'str' ENTREPRENEUR-GPT THOUGHTS: Browsing this website will help us discover different strategies we can employ to invest $1000. We can extract the key information and store it in the Invest_$1000.txt file for future reference. REASONING: Browsing the website will expose us to various investment strategies that we may harness to grow our investment. Documenting the highlights of the website will be important to aid in decision-making and provide reference material for future investments. PLAN:
Expected behavior š¤
The error should not occur
Your prompt š