allenai / ai2thor

An open-source platform for Visual AI.

Home Page:http://ai2thor.allenai.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error about Socket Exception

lzr1130 opened this issue · comments

When I run the demo to test on ai2thor 2.1.0

c = Controller()
c.start()
event = c.step(dict(action="MoveAhead"))
assert event.frame.shape == (300, 300, 3)
print(event.frame.shape)

there is a socketexception in the player.log:

SocketException: The socket has been shut down
at System.Net.Sockets.Socket.Send (System.Byte[] buf) [0x00000] in :0
at AgentManager+c__Iterator3.MoveNext () [0x00000] in :0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in :0

I can see the unity window and see the action of moveahead running, and then it gets stuck.
i use ctrl+c in the command line and see it stops here:

Traceback (most recent call last):
File "/home/orca/anaconda3/envs/alfred210/lib/python3.10/site-packages/ai2thor/controller.py", line 1400, in
event = c.step(dict(action="MoveAhead"))
File "/home/orca/anaconda3/envs/alfred210/lib/python3.10/site-packages/ai2thor/controller.py", line 655, in step
self.last_event = queue_get(self.request_queue)
File "/home/orca/anaconda3/envs/alfred210/lib/python3.10/site-packages/ai2thor/server.py", line 42, in queue_get
res = que.get(block=True, timeout=0.5)
File "/home/orca/anaconda3/envs/alfred210/lib/python3.10/queue.py", line 180, in get
self.not_empty.wait(remaining)
File "/home/orca/anaconda3/envs/alfred210/lib/python3.10/threading.py", line 324, in wait
gotit = waiter.acquire(True, timeout)
KeyboardInterrupt

turn python version to 3.6 will fix this