MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.4k stars 493 forks source link

always "Connection aborted" never success. #55

Closed go-maple closed 1 year ago

go-maple commented 1 year ago

Before submitting an issue, make sure you read the FAQ.md

Briefly describe your issue

""" voyager = Voyager( azure_login=azure_login, openai_api_key=openai_api_key, )

start lifelong learning

voyager.learn() """ always throw this error. many time

image

...

Please provide your python, nodejs, Minecraft, and Fabric versions here

image

Minecraft:1.19 Fabric: fabric-loader-0.14.18-1.19 OS: Macos 12.6.5

...

[If applicable] Please provide the Minefalyer and Minecraft logs, you can find the log under logs folder

Minefalyer: 20230601_133536.log.zip Minecraft: 20230601_133537.log.zip

[If applicable] Please provide the GPT conversations that are printed each round.

"""""""""""" glennxu@xugaorendeMacBook-Pro Voyager % /usr/bin/python3 run_voyager.py Creating Minecraft server Starting Minecraft server Subprocess minecraft started with PID 5119. The mc server is listening on port 60470 Server started on port 60470 Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5163. Server started on port 3000

Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5176. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: plains

Time: sunrise

Nearby blocks: grass_block, dirt, stone, grass, iron_ore, dandelion, cornflower, poppy

Nearby entities (nearest to farthest): rabbit

Health: 20.0/20

Hunger: 20.0/20

Position: x=-31.5, y=95.0, z=-31.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None

Action Agent ai message Explain: No explanation needed as this is the first task.

Plan: 1) Find a wood log block (oak, birch, spruce, jungle, acacia, dark oak, or mangrove) using exploreUntil. 2) Mine the wood log block using mineBlock.

Code:

async function mineWoodLog(bot) {
  const woodLogNames = [
    "oak_log",
    "birch_log",
    "spruce_log",
    "jungle_log",
    "acacia_log",
    "dark_oak_log",
    "mangrove_log",
  ];

  // Find a wood log block
  const woodLogBlock = await exploreUntil(bot, new Vec3(1, 0, 1), 60, () => {
    const woodLog = bot.findBlock({
      matching: (block) => woodLogNames.includes(block.name),
      maxDistance: 32,
    });
    return woodLog;
  });

  if (woodLogBlock) {
    // Mine the wood log block
    await mineBlock(bot, woodLogBlock.name);
    bot.chat("Wood log mined.");
  } else {
    bot.chat("Could not find a wood log.");
  }
}

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5198. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5208. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: plains

Time: day

Nearby blocks: grass_block, dirt, grass, stone

Nearby entities (nearest to farthest): None

Health: 20.0/20

Hunger: 20.0/20

Position: x=-15.5, y=95.0, z=-31.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None

Action Agent ai message Explain: No explanation needed as this is the first task.

Plan: 1) Find a wood log block nearby. 2) Mine the wood log block.

Code:

async function mineWoodLog(bot) {
  // Find a wood log block nearby
  const logBlock = bot.findBlock({
    matching: (block) => {
      return (
        block.name === "oak_log" ||
        block.name === "birch_log" ||
        block.name === "spruce_log" ||
        block.name === "jungle_log" ||
        block.name === "acacia_log" ||
        block.name === "dark_oak_log" ||
        block.name === "mangrove_log"
      );
    },
    maxDistance: 32,
  });

  if (!logBlock) {
    // If no wood log block is found, explore the area
    await exploreUntil(bot, new Vec3(1, 0, 1), 60, () => {
      const logBlock = bot.findBlock({
        matching: (block) => {
          return (
            block.name === "oak_log" ||
            block.name === "birch_log" ||
            block.name === "spruce_log" ||
            block.name === "jungle_log" ||
            block.name === "acacia_log" ||
            block.name === "dark_oak_log" ||
            block.name === "mangrove_log"
          );
        },
        maxDistance: 32,
      });
      return logBlock;
    });
  }

  // Mine the wood log block
  await mineBlock(bot, logBlock.name, 1);
}

mineWoodLog(bot);

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5245. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5261. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: plains

Time: day

Nearby blocks: stone, dirt, copper_ore, grass_block, water

Nearby entities (nearest to farthest): None

Health: 20.0/20

Hunger: 20.0/20

Position: x=-15.5, y=90.0, z=-47.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None

Action Agent ai message Explain: No explanation needed as this is the first task.

Plan: 1) Find a wood log block nearby. 2) Mine the wood log block.

Code:

async function mineWoodLog(bot) {
  // Find a wood log block nearby
  const logBlock = bot.findBlock({
    matching: (block) => {
      return (
        block.name === "oak_log" ||
        block.name === "birch_log" ||
        block.name === "spruce_log" ||
        block.name === "jungle_log" ||
        block.name === "acacia_log" ||
        block.name === "dark_oak_log" ||
        block.name === "mangrove_log"
      );
    },
    maxDistance: 32,
  });

  if (!logBlock) {
    // If no wood log block is found, explore the area
    await exploreUntil(bot, new Vec3(1, 0, 1), 60, () => {
      const logBlock = bot.findBlock({
        matching: (block) => {
          return (
            block.name === "oak_log" ||
            block.name === "birch_log" ||
            block.name === "spruce_log" ||
            block.name === "jungle_log" ||
            block.name === "acacia_log" ||
            block.name === "dark_oak_log" ||
            block.name === "mangrove_log"
          );
        },
        maxDistance: 32,
      });
      return logBlock;
    });
  }

  // Mine the wood log block
  await mineBlock(bot, logBlock.name, 1);
}

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5305. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5314. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5327. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5338. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5352. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5360. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5387. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5400. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5419. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5673. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: plains

Time: noon

Nearby blocks: water, dirt, grass_block, stone, coal_ore, grass, copper_ore

Nearby entities (nearest to farthest): squid

Health: 20.0/20

Hunger: 20.0/20

Position: x=16.5, y=63.0, z=-44.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None

Action Agent ai message Explain: There is no code from the last round, so we will start from scratch.

Plan: 1) Explore until finding a wood log (oak, birch, spruce, jungle, acacia, dark oak, or mangrove). 2) Mine 1 wood log.

Code:

async function mineWoodLog(bot) {
  // Explore until finding a wood log
  const logTypes = [
    "oak_log",
    "birch_log",
    "spruce_log",
    "jungle_log",
    "acacia_log",
    "dark_oak_log",
    "mangrove_log",
  ];
  const log = await exploreUntil(bot, new Vec3(1, 0, 1), 60, () => {
    const foundLog = bot.findBlock({
      matching: (block) => logTypes.includes(block.name),
      maxDistance: 32,
    });
    return foundLog;
  });

  if (log) {
    // Mine 1 wood log
    await mineBlock(bot, log.name, 1);
    bot.chat("Mined 1 wood log.");
  } else {
    bot.chat("Could not find a wood log.");
  }
}

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5823. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5838. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5869. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5883. Server started on port 3000

Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5911. Server started on port 3000

Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting server:http://127.0.0.1:3000 Subprocess mineflayer started with PID 5935. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: plains

Time: noon

Nearby blocks: stone, dirt, grass_block, coal_ore

Nearby entities (nearest to farthest): squid, salmon

Health: 20.0/20

Hunger: 20.0/20

Position: x=10.5, y=67.0, z=-31.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None """"""""""

go-maple commented 1 year ago

@xieleo5 Bro,Can you help to find this problem?

xieleo5 commented 1 year ago

That's strange. I didn't see any error in your log. Did you see the bot moving?

go-maple commented 1 year ago

@xieleo5 bro,I test many times, when I use command "/gamemode spectator". try to move in the game. """ Your last round rollout terminated due to error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) """ It works in iteration now. no error. That's very strange.