MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

Open jinchihe opened this issue 1 year ago • 7 comments

Bug description

I got the error "[IPKernelApp] WARNING | Parent appears to have exited, shutting down." while I'm running the example.

Bug solved method

Environment information

  • LLM type and model name:
  • System version: MacOS
  • Python version: Python 3.11.7
  • packages version:
  • installation method:

Screenshots or logs

MacBook-Pro mytest % python solve_math_problems.py
2024-03-15 22:03:02.242 | INFO     | metagpt.const:get_metagpt_package_root:29 - Package root set to /Users/jason/git/github/MetaGPT/workspace/mytest
-```json
[
    {
        "task_id": "1",
        "dependent_task_ids": [],
        "instruction": "Find the prime factorization of 6 and 126."
    },
    {
        "task_id": "2",
        "dependent_task_ids": ["1"],
        "instruction": "Determine the values of m and n based on the prime factorization and the given conditions."
    },
    {
        "task_id": "3",
        "dependent_task_ids": ["2"],
        "instruction": "Calculate the least possible value of m + n."
    }
]
-```
2024-03-15 22:03:07.142 | INFO     | metagpt.utils.cost_manager:update_cost:52 - Total running cost: $0.001 | Max budget: $10.000 | Current cost: $0.001, prompt_tokens: 265, completion_tokens: 123
2024-03-15 22:03:07.142 | INFO     | metagpt.roles.role:_plan_and_act:494 - ready to take on task task_id='1' dependent_task_ids=[] instruction='Find the prime factorization of 6 and 126.' task_type='' code='' result='' is_success=False is_finished=False
2024-03-15 22:03:07.142 | INFO     | metagpt.roles.di.data_interpreter:_write_code:79 - ready to WriteCodeWithoutTools
2024-03-15 22:03:09.482 | INFO     | metagpt.utils.cost_manager:update_cost:52 - Total running cost: $0.001 | Max budget: $10.000 | Current cost: $0.001, prompt_tokens: 557, completion_tokens: 66
  1 import math
  2
  3 # Prime factorization of 6
  4 prime_factors_6 = [2, 3]
  5
  6 # Prime factorization of 126
  7 prime_factors_126 = [2, 3, 3, 7]
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

2024-03-15 22:03:10.305 | INFO     | metagpt.roles.role:_plan_and_act:494 - ready to take on task task_id='2' dependent_task_ids=['1'] instruction='Determine the values of m and n based on the prime factorization and the given conditions.' task_type='' code='' result='' is_success=False is_finished=False
2024-03-15 22:03:10.306 | INFO     | metagpt.roles.di.data_interpreter:_write_code:79 - ready to WriteCodeWithoutTools
2024-03-15 22:03:11.936 | INFO     | metagpt.utils.cost_manager:update_cost:52 - Total running cost: $0.001 | Max budget: $10.000 | Current cost: $0.001, prompt_tokens: 615, completion_tokens: 21
  1 from sympy import *

2024-03-15 22:03:12.123 | INFO     | metagpt.roles.role:_plan_and_act:494 - ready to take on task task_id='3' dependent_task_ids=['2'] instruction='Calculate the least possible value of m + n.' task_type='' code='' result='' is_success=False is_finished=False
2024-03-15 22:03:12.123 | INFO     | metagpt.roles.di.data_interpreter:_write_code:79 - ready to WriteCodeWithoutTools
2024-03-15 22:03:34.325 | INFO     | metagpt.utils.cost_manager:update_cost:52 - Total running cost: $0.001 | Max budget: $10.000 | Current cost: $0.001, prompt_tokens: 612, completion_tokens: 21
  1 from sympy import *

MacBook-Pro mytest % [IPKernelApp] WARNING | Parent appears to have exited, shutting down.

jinchihe avatar Mar 15 '24 14:03 jinchihe

According to your log:

2024-03-15 22:03:34.325 | INFO     | metagpt.utils.cost_manager:update_cost:52 - Total running cost: $0.001 | Max budget: $10.000 | Current cost: $0.001, prompt_tokens: 612, completion_tokens: 21
  1 from sympy import *

the llm didn't provide a runnable code:

from sympy import *

What's the model name?

iorisa avatar Mar 19 '24 07:03 iorisa

What's the model name?

The model is GPT 3.5. Seems that's OK with azure gpt 4.

jinchihe avatar Mar 20 '24 02:03 jinchihe

I suspect that the calling speed is too high. Maybe @garylin2099 can confirm

geekan avatar Mar 21 '24 03:03 geekan

Thank you for bringing up this issue. I've attempted to reproduce the bug following the steps you provided, but so far, I haven't been successful. I'll continue trying, and I'd also like to ask for more information from you. Specifically, could you please provide details about your IDE software (such as VSCode or PyCharm), and any other configurations that might be relevant to this problem? Additionally, if you could offer more detailed reproduction steps or any relevant log information, it would be greatly appreciated. Thank you!

orange-crow avatar Mar 25 '24 08:03 orange-crow

https://github.com/geekan/MetaGPT/pull/1141 may solve your problem.

orange-crow avatar Apr 02 '24 10:04 orange-crow

Great thanks! I'm going to have a try. @orange-crow

jinchihe avatar Apr 03 '24 00:04 jinchihe

Great thanks! I'm going to have a try. @orange-crow

hi,Does it https://github.com/geekan/MetaGPT/pull/1141 work?

orange-crow avatar Apr 09 '24 02:04 orange-crow