ai2thor icon indicating copy to clipboard operation
ai2thor copied to clipboard

when I run the code of ai2Thor there is a problem about File exists(in fifo_server.py)

Open snow2white opened this issue 2 years ago • 5 comments

it says: FileExistsError: [Errno 17] File exists Error message is:

/opt/conda/lib/python3.7/site-packages/ai2thor/controller.py in start(self, port, start_unity, width, height, x_display, host, player_screen_width, player_screen_height) 1143 image_name = None 1144 -> 1145 self.server.start() 1146 if platform.system() == "Linux": 1147 if x_display:

/opt/conda/lib/python3.7/site-packages/ai2thor/fifo_server.py in start(self) 200 201 def start(self): --> 202 os.mkfifo(self.server_pipe_path) 203 os.mkfifo(self.client_pipe_path) 204 self.started = True

snow2white avatar Oct 19 '21 09:10 snow2white

Could you tell me what version of Python, Linux, ai2thor you are using? Are you running within Docker? Can you provide a simple script to reproduce the error?

ekolve avatar Oct 22 '21 22:10 ekolve

from ai2thor.controller import Controller

controller = Controller(scene="FloorPlan212") controller.start() while True: controller.step("MoveBack") controller.step("MoveLeft") controller.step("MoveRight")

There seems to be a problem here if i hanve "controller.start()",it will be display "File Exists" erros

snow2white avatar Oct 23 '21 04:10 snow2white

"controller.start()" This directive can be used before version 2.4.10. I cannot use this directive after version 2.4.10, which directly reports an error File exists

snow2white avatar Oct 23 '21 07:10 snow2white

I am running into this issue as well - is there an alternative command to controller.start() that we should use now?

ninamoorman avatar Jan 31 '22 23:01 ninamoorman

Hi @ninamoorman,

You no longer need to call controller.start() as that is called automatically in the Controller's __init__ method now. One now only has to call:

from ai2thor.controller import Controller
controller = Controller(scene="FloorPlan212")
controller.step(action="MoveAhead")

See this Colab notebook for an example: https://colab.research.google.com/github/allenai/ai2thor-colab/blob/main/templates/AI2_THOR_Full_Starter_Template.ipynb.

mattdeitke avatar Feb 02 '22 05:02 mattdeitke