[geekan/MetaGPT]FileNotFoundError: [WinError 2] 找不到文件

2024-05-16 582 views
7

请问这是什么原因呢?该怎么解决 `

Anything UNCLEAR

The requirement is clear to me. Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613. 2023-09-10 14:58:56.429 | INFO | metagpt.provider.openai_api:update_cost:79 - Total running cost: $0.133 | Max budget: $3.000 | Current cost: $0.066, prompt_tokens: 1217, completion_tokens: 485 C:\Users\Administrator\AppData\Roaming\npm\mmdc C:\Users\Administrator\AppData\Roaming\npm\mmdc.cmd 2023-09-10 14:58:56.479 | INFO | metagpt.utils.mermaid:mermaid_to_file:37 - Generating E:\AIAplication\metagpt\workspace\cli_snake_game\resources\competitive_analysis.pdf.. Traceback (most recent call last): File "E:\AIAplication\metagpt\startup.py", line 71, in fire.Fire(main) File "E:\Anaconda\envs\metagpt\Lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Anaconda\envs\metagpt\Lib\site-packages\fire\core.py", line 466, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "E:\Anaconda\envs\metagpt\Lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "E:\AIAplication\metagpt\startup.py", line 66, in main asyncio.run(startup(idea, investment, n_round, File "E:\Anaconda\envs\metagpt\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "E:\Anaconda\envs\metagpt\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Anaconda\envs\metagpt\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "E:\AIAplication\metagpt\startup.py", line 43, in startup await company.run(n_round=n_round) File "E:\AIAplication\metagpt\metagpt\software_company.py", line 60, in run await self.environment.run() File "E:\AIAplication\metagpt\metagpt\environment.py", line 67, in run await asyncio.gather(futures) File "E:\AIAplication\metagpt\metagpt\roles\role.py", line 240, in run rsp = await self._react() ^^^^^^^^^^^^^^^^^^^ File "E:\AIAplication\metagpt\metagpt\roles\role.py", line 209, in _react return await self._act() ^^^^^^^^^^^^^^^^^ File "E:\AIAplication\metagpt\metagpt\roles\role.py", line 168, in _act response = await self._rc.todo.run(self._rc.important_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AIAplication\metagpt\metagpt\actions\design_api.py", line 142, in run self._save(context, system_design) File "E:\AIAplication\metagpt\metagpt\actions\design_api.py", line 135, in _save self._save_prd(docs_path, resources_path, context[-1].content) File "E:\AIAplication\metagpt\metagpt\actions\design_api.py", line 109, in _save_prd mermaid_to_file(quadrant_chart, resources_path / 'competitive_analysis') File "E:\AIAplication\metagpt\metagpt\utils\mermaid.py", line 56, in mermaid_to_file subprocess.run([CONFIG.mmdc, "-i", str(tmp), "-o", output_file, "-w", str(width), "-H", str(height)]) File "E:\Anaconda\envs\metagpt\Lib\subprocess.py", line 548, in run with Popen(popenargs, kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Anaconda\envs\metagpt\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "E:\Anaconda\envs\metagpt\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] 系统找不到指定的文件。 `

回答

6

我遇到了同样的错误

6

我遇到了同样的错误

3

在我的metagpt安装目录中,运行以下代码解决了我的问题,希望可以帮助你

npm uninstall -g @mermaid-js/mermaid-cli
cd metagpt
npm install @mermaid-js/mermaid-cli