MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

FileNotFoundError: [WinError 2] The system cannot find the file specified

Open abhay-asindia opened this issue 2 years ago • 2 comments
trafficstars

getting FileNotFoundError with below stacktrace can anyone help?

Anything UNCLEAR

The requirement is clear to me. Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613. yyyy-mm-dd 12:42:30.537 | INFO | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.149 | Max budget: $3.000 | Current cost: $0.077, prompt_tokens: 1291, completion_tokens: 643 C:\Users*\AppData\Roaming\npm\mmdc C:\Users*\AppData\Roaming\npm\mmdc.cmd yyyy-mm-dd 12:42:30.753 | INFO | metagpt.utils.mermaid:mermaid_to_file:44 - Generating C:\Users***\MetaGPT\workspace\clinic_management_system\resources\competitive_analysis.pdf.. Traceback (most recent call last): File "C:\Users***\MetaGPT\startup.py", line 72, in fire.Fire(main) File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\site-packages\fire\core.py", line 466, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace component = fn(varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users***\MetaGPT\startup.py", line 68, in main asyncio.run(startup(idea, investment, n_round, code_review, run_tests, implement)) File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users***\MetaGPT\startup.py", line 47, in startup await company.run(n_round=n_round) File "C:\Users***\MetaGPT\metagpt\software_company.py", line 60, in run await self.environment.run() File "C:\Users***\MetaGPT\metagpt\environment.py", line 67, in run await asyncio.gather(futures) File "C:\Users***\MetaGPT\metagpt\roles\role.py", line 240, in run rsp = await self._react() ^^^^^^^^^^^^^^^^^^^ File "C:\Users***\MetaGPT\metagpt\roles\role.py", line 209, in _react return await self._act() ^^^^^^^^^^^^^^^^^ File "C:\Users***\MetaGPT\metagpt\roles\role.py", line 168, in _act response = await self._rc.todo.run(self._rc.important_memory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users***\MetaGPT\metagpt\actions\design_api.py", line 142, in run await self._save(context, system_design) File "C:\Users***\MetaGPT\metagpt\actions\design_api.py", line 135, in _save await self._save_prd(docs_path, resources_path, context[-1].content) File "C:\Users***\MetaGPT\metagpt\actions\design_api.py", line 109, in _save_prd await mermaid_to_file(quadrant_chart, resources_path / 'competitive_analysis') File "C:\Users****\MetaGPT\metagpt\utils\mermaid.py", line 62, in mermaid_to_file process = await asyncio.create_subprocess_exec( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\subprocess.py", line 221, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\base_events.py", line 1694, in subprocess_exec transport = await self._make_subprocess_transport( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\windows_events.py", line 399, in _make_subprocess_transport transp = _WindowsSubprocessTransport(self, protocol, args, shell, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\base_subprocess.py", line 36, in init self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\windows_events.py", line 921, in _start self._proc = windows_utils.Popen( ^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\asyncio\windows_utils.py", line 153, in init super().init(args, stdin=stdin_rfd, stdout=stdout_wfd, File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\ProgramData\Anaconda3\envs\metagpt\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified

abhay-asindia avatar Sep 19 '23 07:09 abhay-asindia

Have you installed the Mermaid CLI and changed the MMDC configuration? https://github.com/geekan/MetaGPT/blob/2cfa7af826767049181c6bf0b8d492ec6c0803b3/config/config.yaml#L70

shenchucheng avatar Sep 19 '23 10:09 shenchucheng

i have that problem too. https://github.com/geekan/MetaGPT/issues/342#issuecomment-1725258688 in what way i must do that?

SzymonMas avatar Sep 25 '23 19:09 SzymonMas

If this problem still exists, you are welcome to reopen it

geekan avatar Mar 21 '24 12:03 geekan