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

problems happened when I use"create a 2048 game" #1236

Closed
tiantaiping2024 opened this issue Apr 29, 2024 · 1 comment
Closed

problems happened when I use"create a 2048 game" #1236

tiantaiping2024 opened this issue Apr 29, 2024 · 1 comment

Comments

@tiantaiping2024
Copy link

Bug description

2024-04-29 11:55:25.443 | ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 11.990(s), this was the 1st time calling it. exp: RetryError[<Future at 0x7f8ce04056d0 state=finished raised JSONDecodeError>]

2024-04-29 11:56:40.379 | INFO | metagpt.utils.repair_llm_raw_output:repair_invalid_json:237 - repair_invalid_json, raw error: Expecting ',' delimiter: line 4 column 31 (char 89)
2024-04-29 11:56:40.380 | ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 86.928(s), this was the 6th time calling it. exp: RetryError[<Future at 0x7f8ce04c8250 state=finished raised JSONDecodeError>]
2024-04-29 11:56:40.380 | WARNING | metagpt.utils.common:wrapper:649 - There is a exception in role's execution, in order to resume, we delete the newest role communication message in the role's memory.
2024-04-29 11:56:40.392 | ERROR | metagpt.utils.common:wrapper:631 - Exception occurs, start to serialize the project, exp:
Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/repair_llm_raw_output.py", line 296, in retry_parse_json_text
parsed_data = CustomDecoder(strict=False).decode(output)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 31 (char 89)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/action_node.py", line 425, in _aask_v1
parsed_data = llm_output_postprocess(
tenacity.RetryError: RetryError[<Future at 0x7f8ce04c8250 state=finished raised JSONDecodeError>]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/common.py", line 640, in wrapper
return await func(self, *args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/roles/role.py", line 550, in run
rsp = await self.react()
tenacity.RetryError: RetryError[<Future at 0x7f8ce04c8dc0 state=finished raised RetryError>]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/common.py", line 626, in wrapper
result = await func(self, *args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/team.py", line 134, in run
await self.env.run()
Exception: Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/repair_llm_raw_output.py", line 296, in retry_parse_json_text
parsed_data = CustomDecoder(strict=False).decode(output)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/custom_decoder.py", line 297, in decode
return super().decode(s)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/custom_decoder.py", line 65, in scan_once
return _scan_once(string, idx)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/custom_decoder.py", line 36, in _scan_once
return parse_object((string, idx + 1), strict, _scan_once, object_hook, object_pairs_hook, memo)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/custom_decoder.py", line 164, in JSONObject
value, end = scan_once(s, end)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/custom_decoder.py", line 38, in _scan_once
return parse_array((string, idx + 1), _scan_once)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/json/decoder.py", line 242, in JSONArray
raise JSONDecodeError("Expecting ',' delimiter", s, end - 1)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 31 (char 89)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/action_node.py", line 425, in _aask_v1
parsed_data = llm_output_postprocess(
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/provider/postprocess/llm_output_postprocess.py", line 19, in llm_output_postprocess
result = postprocess_plugin.run(output=output, schema=schema, req_key=req_key)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/provider/postprocess/base_postprocess_plugin.py", line 68, in run
new_output = self.run_repair_llm_output(output=output, schema=schema, req_key=req_key)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/provider/postprocess/base_postprocess_plugin.py", line 32, in run_repair_llm_output
parsed_data = self.run_retry_parse_json_text(content)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/provider/postprocess/base_postprocess_plugin.py", line 47, in run_retry_parse_json_text
parsed_data = retry_parse_json_text(output=content) # should use output=content
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f8ce04c8250 state=finished raised JSONDecodeError>]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/utils/common.py", line 640, in wrapper
return await func(self, *args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/roles/role.py", line 550, in run
rsp = await self.react()
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/roles/role.py", line 517, in react
rsp = await self._react()
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/roles/role.py", line 463, in _react
rsp = await self._act()
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/roles/role.py", line 392, in _act
response = await self.rc.todo.run(self.rc.history)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/project_management.py", line 43, in run
task_doc = await self._update_tasks(filename=filename)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/project_management.py", line 66, in _update_tasks
rsp = await self._run_new_tasks(context=system_design_doc.content)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/project_management.py", line 76, in _run_new_tasks
node = await PM_NODE.fill(context, self.llm, schema=self.prompt_schema)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/action_node.py", line 505, in fill
return await self.simple_fill(schema=schema, mode=mode, images=images, timeout=timeout, exclude=exclude)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/metagpt/actions/action_node.py", line 457, in simple_fill
content, scontent = await self._aask_v1(
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/_asyncio.py", line 47, in call
do = self.iter(retry_state=retry_state)
File "/Users/moonmovewhilecloudchange/opt/anaconda3/envs/metagpt/lib/python3.9/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f8ce04c8dc0 state=finished raised RetryError>]

  • LLM type and model name:
  • System version:glm-4
  • Python version:3.9
  • MetaGPT version or branch:
  • packages version:
  • installation method:

Screenshots or logs

@seehi
Copy link
Contributor

seehi commented Apr 29, 2024

Seems get wrong answer from LLM, prefer gpt-4-turbo

@geekan geekan closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants