geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
44.06k stars 5.24k forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'config/config2.yaml' #1230

Open JustWeZero opened 5 months ago

JustWeZero commented 5 months ago

Bug description I ran a demo in docker container, and I got: root@c6ac7bb2afda:~# metagpt "write a cli blackjack game" 2024-04-26 08:49:10.846 | INFO | metagpt.const:get_metagpt_package_root:29 - Package root set to /app/metagpt 2024-04-26 08:49:16.135 | INFO | metagpt.team:invest:93 - Investment: $3.0. 2024-04-26 08:49:16.139 | INFO | metagpt.roles.role:_act:396 - Alice(Product Manager): to do PrepareDocuments(PrepareDocuments) 2024-04-26 08:49:16.662 | INFO | metagpt.utils.file_repository:save:57 - save to: /app/metagpt/workspace/20240426084916/docs/requirement.txt 2024-04-26 08:49:16.667 | INFO | metagpt.roles.role:_act:396 - Alice(Product Manager): to do WritePRD(WritePRD) 2024-04-26 08:49:16.679 | INFO | metagpt.actions.write_prd:run:86 - New requirement detected: write a cli blackjack game [CONTENT] { "Language": "en_us", "Programming Language": "Python", "Original Requirements": "Create a CLI blackjack game", "Project Name": "cli_blackjack", "Product Goals": [ "Deliver a seamless and enjoyable CLI gaming experience", "Ensure the game adheres to standard blackjack rules", "Provide a user-friendly interface within the CLI environment" ], "User Stories": [ "As a player, I want to be able to hit, stand, split, and double down", "As a player, I want to see my chip count and bets", "As a player, I want a simple way to place bets", "As a player, I want to see the dealer's hand and my hand clearly", "As a player, I want to be able to play multiple rounds" ], "Competitive Analysis": [ "Blackjack Game A: Basic CLI blackjack with limited features", "Blackjack Game B: Offers a splits and double down but lacks a betting system", "Online Blackjack C: Interactive CLI with a betting system but no splits" ], "Competitive Quadrant Chart": "quadrantChart\n title \"Feature Set and User Experience in CLI Blackjack Games\"\n x-axis \"Limited Features\" --> \"Robust Features\"\n y-axis \"Poor User Experience\" --> \"Great User Experience\"\n quadrant-1 \"Basic Games\"\n quadrant-2 \"Feature Expansion Needed\"\n quadrant-3 \"User Experience Improvement Needed\"\n quadrant-4 \"Preferred Games\"\n \"Blackjack Game A\": [0.2, 0.3]\n \"Blackjack Game B\": [0.4, 0.5]\n \"Online Blackjack C\": [0.6, 0.7]\n \"Our Target Product\": [0.7, 0.8]", "Requirement Analysis": "The game must follow standard blackjack rules and provide a simple yet engaging CLI interface.", "Requirement Pool": [ [ "P0", "Game mechanics including hit, stand, split, and double down" ], [ "P1", "Chip count and betting system" ], [ "P1", "Dealer and player hand display" ], [ "P2", "Ability to play multiple rounds" ], [ "P2", "Simple and clear instructions for gameplay" ] ], "UI Design draft": "The CLI interface will have clear text-based representations of cards and bets, with a simple layout to indicate the dealer's hand and player's hand.", "Anything UNCLEAR": "The original requirements do not specify the need for a betting system or the ability to play against other players. Clarification on these points would be helpful." } [/CONTENT] 2024-04-26 08:49:39.433 | INFO | metagpt.utils.cost_manager:update_cost:57 - Total running cost: $0.022 | Max budget: $3.000 | Current cost: $0.022, prompt_tokens: 942, completion_tokens: 607 2024-04-26 08:49:39.445 | WARNING | metagpt.utils.git_repository:rename_root:217 - Failed to move /app/metagpt/workspace/20240426084916 to /app/metagpt/workspace/cli_blackjack 2024-04-26 08:49:39.465 | INFO | metagpt.utils.file_repository:save:57 - save to: /app/metagpt/workspace/20240426084916/docs/prd/20240426084939.json 2024-04-26 08:49:39.490 | INFO | metagpt.utils.file_repository:save:57 - save to: /app/metagpt/workspace/20240426084916/resources/prd/20240426084939.md 2024-04-26 08:49:39.496 | INFO | metagpt.roles.role:_act:396 - Bob(Architect): to do WriteDesign(WriteDesign) 2024-04-26 08:49:50.021 | INFO | metagpt.actions.design_api:run:67 - Nothing has changed. 2024-04-26 08:49:50.025 | INFO | metagpt.roles.role:_act:396 - Eve(Project Manager): to do WriteTasks(WriteTasks) 2024-04-26 08:50:00.081 | INFO | metagpt.actions.project_management:run:54 - Nothing has changed. 2024-04-26 08:50:16.092 | INFO | metagpt.utils.git_repository:archive:168 - Archive: ['config/config2.yaml'] 2024-04-26 08:50:21.539 | ERROR | metagpt.utils.common:wrapper:631 - Exception occurs, start to serialize the project, exp: Traceback (most recent call last): File "/app/metagpt/metagpt/utils/common.py", line 626, in wrapper result = await func(self, *args, **kwargs) File "/app/metagpt/metagpt/team.py", line 134, in run self.env.archive(auto_archive) FileNotFoundError: [Errno 2] No such file or directory: 'config/config2.yaml'

ba

Bug solved method

Environment information

Docker image: metagpt/metagpt:latest Docker start cmd: docker run -itd \ --privileged \ -v /mnt/e/Python_Project/MetaGPT:/app/metagpt\ metagpt/metagpt:latest

And I ran: cd /app/metagpt && pip install -e .

Screenshots or logs

my config2.yaml: image

seehi commented 5 months ago

It seems the same with this issue. Try out main branch.