AutoGPT
AutoGPT copied to clipboard
Fatal error reading JSON
⚠️ Search for existing issues first ⚠️
- [X] I have searched the existing issues, and there is no existing issue for my problem
Which Operating System are you using?
MacOS
Which version of Auto-GPT are you using?
Master (branch)
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce 🕹
Stack trace of the error. The error handling should allow for a graceful fail that allows AutoGPT to continue.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/app/autogpt/main.py", line 5, in
Current behavior 😯
Exit on error.
Expected behavior 🤔
Graceful fail on error.
Your prompt 📝
# Paste your prompt here
Your Logs 📒
<insert your logs here>
Can anyone explain the error? Is it caused when saving memory? Or loading memory?
I am using local memory and running locally (w/o docker container)
Same error while reading a local python file that I copied into the working directory:
NEXT ACTION: COMMAND = read_file ARGUMENTS = {'filename': '/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/auto_gpt_workspace/hash-grid-encoding/train.py'}
Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
SYSTEM: 『Spit out the code correctly』
Traceback (most recent call last):
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/__main__.py", line 5, in <module>
autogpt.cli.main()
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/cli.py", line 90, in main
run_auto_gpt(
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/main.py", line 171, in run_auto_gpt
agent.start_interaction_loop()
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/agent/agent.py", line 94, in start_interaction_loop
assistant_reply = chat_with_ai(
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/llm/chat.py", line 166, in chat_with_ai
agent.summary_memory = update_running_summary(
File "/home/hangyu5/Documents/Git-repoMy/AIResearchVault/repo/LLMApp/Auto-GPT/autogpt/memory_management/summary_memory.py", line 76, in update_running_summary
content_dict = json.loads(event["content"])
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/hangyu5/anaconda3/envs/autogpt/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 13 column 9 (char 913)
@ALL need help with this error, it is annoying, can't even make gpt read local file?!
Hey posting you need help after reporting an issue is not going to do much for anyone... I suggest looking through all the other similar issue posts and the DISCUSSIONS pages...
I'm having a similar problem, program runs normally when I stop this error
I get this error all the time, tried several different python versions, but it seems that there is some hallucination from gpt 3.5 that creates bad JSON, then the program crashes with that error, or similar with json.decoder.JSONDecodeError getting pissed off.
guys - have any of you searched the current and all issues for this? A quick search shows lots of threads on this same topic... no need to add new issues... look at the different ways and work arounds that are already posted...
guys - have any of you searched the current and all issues for this? A quick search shows lots of threads on this same topic... no need to add new issues... look at the different ways and work arounds that are already posted...
Yep, but none is solved? https://github.com/Significant-Gravitas/Auto-GPT/issues/21
Microsoft/Github probably need an AI to automatically reply issue/bug repot/erro with best fitting history answers, so that we do have to repetivively search issues/discussions all the time!!!
I have tried this several times now, and every time it stops and crashes with this JSON error. Will there be an update that fixes this problem?
Duplicate of the various JSONDecodeError bugs coming from summary_memory.py. Marking as duplicate of https://github.com/Significant-Gravitas/Auto-GPT/issues/3716
See: https://github.com/anonhostpi/AUTOGPT.TRACKERS/blob/main/TOPICS/0017.BUGS/JSON.md
Possibly fixed in Fixed with in #3996