allenai / ai2thor

An open-source platform for Visual AI.
http://ai2thor.allenai.org
Apache License 2.0
1.09k stars 210 forks source link

Error about Socket Exception #1198

Closed lzr1130 closed 3 months ago

lzr1130 commented 3 months ago

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

lzr1130 commented 3 months ago

turn python version to 3.6 will fix this