vlandlive / scene-based-generative-agent

Scene-Based Generative Agent
https://us.vland.live/app
MIT License
36 stars 7 forks source link

IndexError: list index out of range #1

Closed yuuuuuuuuri closed 1 year ago

yuuuuuuuuri commented 1 year ago

I have run the code and get the error below.

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー connect success handshakeack success Tommie generated successfully! Traceback (most recent call last): File "/content/drive/MyDrive/scene-based-generative-agent-main/main.py", line 163, in generate_agents_by_data() File "/content/drive/MyDrive/scene-based-generative-agent-main/main.py", line 157, in generate_agents_by_data agent = VlandAgent(player, vland, eventbus) File "/content/drive/MyDrive/scene-based-generative-agent-main/main.py", line 58, in init self.vland.born_in_space(self.playerInfo, area="living room") File "/content/drive/MyDrive/scene-based-generative-agent-main/vland/vlandapi.py", line 179, in born_in_space area = random.choice(self.areaList["names"]) File "/usr/lib/python3.10/random.py", line 378, in choice return seq[self._randbelow(len(seq))] IndexError: list index out of range ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

Can anyone help me figure out what is causing this?

JasonCaoCJX commented 1 year ago

It seems that there is no interactive area added to your space. The interaction area in the scene should correspond to the name of the area where the agent was born.

截屏2023-06-09 14 23 01
yuuuuuuuuri commented 1 year ago

I have successfully resolved the issue. Thank you very much!!!!!!