-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
遇到个bug tenacity.RetryError: RetryError[<Future at 0x7f0b05a80c40 state=finished raised RetryError>] #1663
Comments
random class Game:
Create a simple game with 2048 players and a leaderboardgame = Game() Play the gamegame.play(player1) Get user's best score and restart buttonbest_score = game.get_best_score() Get user's current scorecurrent_score = random.randint(0, 2047) Get user's best scorebest_score = game.get_best_score() Get user's restart buttonbest_button = game.get_restart_button() print("Player 1: {player1}, Player 2: {player2}, Player 3: {player3}, Player 4: {player4}, Player 5: {player5}")
This code creates a simple game with 2048 players and a leaderboard. The player's scores are displayed on the screen, and the best score is displayed at the top of the leaderboard. The restart button is also displayed at the top of the leaderboard.这个bug出现在中间位置。最后还是生成了代码。 |
生成的代码运行不起来 |
你可以试试用增量开发功能来修这个bug。 |
Bug description
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/app/metagpt/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 value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "/app/metagpt/metagpt/actions/action_node.py", line 442, in _aask_v1
parsed_data = llm_output_postprocess(
tenacity.RetryError: RetryError[<Future at 0x7f0b05a80cd0 state=finished raised JSONDecodeError>]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/metagpt/metagpt/utils/common.py", line 664, in wrapper
return await func(self, *args, **kwargs)
File "/app/metagpt/metagpt/roles/role.py", line 551, in run
rsp = await self.react()
tenacity.RetryError: RetryError[<Future at 0x7f0b05a80c40 state=finished raised RetryError>]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/metagpt/metagpt/utils/common.py", line 650, in wrapper
result = await func(self, *args, **kwargs)
File "/app/metagpt/metagpt/team.py", line 134, in run
await self.env.run()
Exception: Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/app/metagpt/metagpt/utils/repair_llm_raw_output.py", line 296, in retry_parse_json_text
parsed_data = CustomDecoder(strict=False).decode(output)
File "/app/metagpt/metagpt/utils/custom_decoder.py", line 297, in decode
return super().decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/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)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "/app/metagpt/metagpt/actions/action_node.py", line 442, in _aask_v1
parsed_data = llm_output_postprocess(
File "/app/metagpt/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 "/app/metagpt/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 "/app/metagpt/metagpt/provider/postprocess/base_postprocess_plugin.py", line 32, in run_repair_llm_output
parsed_data = self.run_retry_parse_json_text(content)
File "/app/metagpt/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 "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f0b05a80cd0 state=finished raised JSONDecodeError>]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/metagpt/metagpt/utils/common.py", line 664, in wrapper
return await func(self, *args, **kwargs)
File "/app/metagpt/metagpt/roles/role.py", line 551, in run
rsp = await self.react()
File "/app/metagpt/metagpt/roles/role.py", line 520, in react
rsp = await self._react()
File "/app/metagpt/metagpt/roles/role.py", line 475, in _react
rsp = await self._act()
File "/app/metagpt/metagpt/roles/role.py", line 404, in _act
response = await self.rc.todo.run(self.rc.history)
File "/app/metagpt/metagpt/actions/write_prd.py", line 87, in run
return await self._handle_new_requirement(req)
File "/app/metagpt/metagpt/actions/write_prd.py", line 108, in _handle_new_requirement
node = await WRITE_PRD_NODE.fill(context=context, llm=self.llm, exclude=exclude) # schema=schema
File "/app/metagpt/metagpt/actions/action_node.py", line 648, in fill
return await self.simple_fill(schema=schema, mode=mode, images=images, timeout=timeout, exclude=exclude)
File "/app/metagpt/metagpt/actions/action_node.py", line 473, in simple_fill
content, scontent = await self._aask_v1(
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 47, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f0b05a80c40 state=finished raised RetryError>]
Environment information
lmstudio 部署的 qwen1.5-0.5b-chat。
在你们提供的docker容器运行。
能够输出code代码。不知道什么原因造成的。
The text was updated successfully, but these errors were encountered: