Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-GPT process crashed... #3744

Closed
1 task done
CholoTook opened this issue May 3, 2023 · 10 comments
Closed
1 task done

Auto-GPT process crashed... #3744

CholoTook opened this issue May 3, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@CholoTook
Copy link

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Linux

Which version of Auto-GPT are you using?

Stable (branch)

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

For some reason the DockerHub image wasn't working, so I did docker-compose build . -t auto-gpt (on the stable branch) and updated the docker-compose.yml to use that image.

One minute it was chugging along, next minute I get this error:

SYSTEM:  Command append_to_file returned: Text appended successfully.
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 <module>
    autogpt.cli.main()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/app/autogpt/cli.py", line 90, in main
    run_auto_gpt(
  File "/app/autogpt/main.py", line 171, in run_auto_gpt
    agent.start_interaction_loop()
  File "/app/autogpt/agent/agent.py", line 94, in start_interaction_loop
    assistant_reply = chat_with_ai(
  File "/app/autogpt/llm/chat.py", line 166, in chat_with_ai
    agent.summary_memory = update_running_summary(
  File "/app/autogpt/memory_management/summary_memory.py", line 76, in update_running_summary
    content_dict = json.loads(event["content"])
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR: 1

While I was trying to get docker hub version to work I did:

python3 -m venv .venv
source .venv/bin/activate
./run.sh

Which may be interacting with the newly built docker image...

Current behavior 😯

It crashes.

Expected behavior 🤔

Throw a warning about a sub-process I guess?

Your prompt 📝

# Paste your prompt here

Your Logs 📒

2023-05-03 15:21:29,054 ERROR logs:_log:136 The JSON object is invalid. 
@CholoTook
Copy link
Author

I should mention:
docker-compose run --rm auto-gpt --gpt3only

@CholoTook

This comment was marked as spam.

@k-boikov
Copy link
Contributor

k-boikov commented May 3, 2023

Seems like we have a bug in summary_memory, this is the 3rd report for 24h.

@k-boikov
Copy link
Contributor

k-boikov commented May 3, 2023

Please upvote and check #3672

@CholoTook
Copy link
Author

Please upvote and check #3672

Sorry, how do I upvote?

@CholoTook
Copy link
Author

Anything I can do to help?

@dpsalvatierra
Copy link

dpsalvatierra commented May 7, 2023

Not docker build, just standard python venv execution, same problem on Ubuntu 22.04

REASONING:  Using the write_to_file command will allow me to save the extracted text to a file for further analysis and processing. This will help me to identify any patterns or trends in the data that may be relevant for issue resolution and knowledge management.
PLAN:
-  Use the write_to_file command to write the extracted text to a file named randomtext.txt'.
CRITICISM:  I need to ensure that the text is properly formatted and organized before using it for issue resolution and knowledge management.
NEXT ACTION:  COMMAND = write_to_file ARGUMENTS = {'filename': '/home/dsalvat1/Auto-GPT/autogpt/auto_gpt_workspace/randomtext.txt', 'text': 'Random text.'}
SYSTEM:  Command write_to_file returned: File written to successfully.
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/dsalvat1/Auto-GPT/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/dsalvat1/Auto-GPT/venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/dsalvat1/Auto-GPT/autogpt/cli.py", line 90, in main
    run_auto_gpt(
  File "/home/dsalvat1/Auto-GPT/autogpt/main.py", line 171, in run_auto_gpt
    agent.start_interaction_loop()
  File "/home/dsalvat1/Auto-GPT/autogpt/agent/agent.py", line 94, in start_interaction_loop
    assistant_reply = chat_with_ai(
  File "/home/dsalvat1/Auto-GPT/autogpt/llm/chat.py", line 166, in chat_with_ai
    agent.summary_memory = update_running_summary(
  File "/home/dsalvat1/Auto-GPT/autogpt/memory_management/summary_memory.py", line 76, in update_running_summary
    content_dict = json.loads(event["content"])
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/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 1058)
Press any key to continue...

Stopping now because I am just consuming openai API calls. This is a simple script to scrape product prices from the web.

@PortlandKyGuy
Copy link
Contributor

I had the same issue on Mac and not using docker. As mentioned above, there is an issue in summary_memory.py and not handling exceptions. I will follow @k-boikov 's instructions above.

File "/Users/xxxxx/Projects/AutoGPTActiveProjects/xxxxx/autogpt/llm/chat.py", line 166, in chat_with_ai agent.summary_memory = update_running_summary( ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xxxxx/Projects/AutoGPTActiveProjects/xxxxx/autogpt/memory_management/summary_memory.py", line 76, in update_running_summary content_dict = json.loads(event["content"])

@anegoda1995
Copy link

I had the same error:

SYSTEM:  Command write_tests returned: `// Tests for Snake Game // Test generateFood function function testGenerateFood() { generateFood(); if (food.x < 0 || food.x >= canvasWidth || food.y < 0 || food.y >= canvasHeight) { console.error('generateFood test failed: food is out of bounds'); } } // Test moveSnake function function testMoveSnake() { // Move snake right direction = 'right'; let oldHead = snake[0]; moveSnake(); let newHead = snake[0]; if (newHead.x !== oldHead.x + 10 || newHead.y !== oldHead.y) { console.error('moveSnake test failed: snake did not move right'); } // Move snake left direction = 'left'; oldHead = snake[0]; moveSnake(); newHead = snake[0]; if (newHead.x !== oldHead.x - 10 || newHead.y !== oldHead.y) { console.error('moveSnake test failed: snake did not move left'); } // Move snake up direction = 'up'; oldHead = snake[0]; moveSnake(); newHead = snake[0]; if (newHead.x !== oldHead.x || newHead.y !== oldHead.y - 10) { console.error('moveSnake test failed: snake did not move up'); } // Move snake down direction = 'down'; oldHead = snake[0]; moveSnake(); newHead = snake[0]; if (newHead.x !== oldHead.x || newHead.y !== oldHead.y + 10) { console.error('moveSnake test failed: snake did not move down'); } } // Test checkCollision function function testCheckCollision() { // Add second segment to snake snake.push({x: snake[0].x, y: snake[0].y + 10}); if (checkCollision()) { console.error('checkCollision test failed: snake collided with self'); } // Move snake into self direction = 'down'; moveSnake(); if (!checkCollision()) { console.error('checkCollision test failed: snake did not collide with self'); } } // Run tests function runTests() { testGenerateFood(); testMoveSnake(); testCheckCollision(); } runTests();`
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 <module>
    autogpt.cli.main()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/app/autogpt/cli.py", line 90, in main
    run_auto_gpt(
  File "/app/autogpt/main.py", line 171, in run_auto_gpt
    agent.start_interaction_loop()
  File "/app/autogpt/agent/agent.py", line 112, in start_interaction_loop
    assistant_reply = chat_with_ai(
  File "/app/autogpt/llm/chat.py", line 167, in chat_with_ai
    agent.summary_memory = update_running_summary(
  File "/app/autogpt/memory_management/summary_memory.py", line 76, in update_running_summary
    content_dict = json.loads(event["content"])
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@k-boikov k-boikov added the bug Something isn't working label May 9, 2023
@anonhostpi
Copy link

anonhostpi commented May 12, 2023

Duplicate of the various JSONDecodeError bugs coming from summary_memory.py. Marking as duplicate of #3716

See: https://github.com/anonhostpi/AUTOGPT.TRACKERS/blob/main/TOPICS/0017.BUGS/JSON.md

@anonhostpi anonhostpi closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants