ai2thor
ai2thor copied to clipboard
when I run the code of ai2Thor there is a problem about File exists(in fifo_server.py)
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
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?
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
"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
I am running into this issue as well - is there an alternative command to controller.start() that we should use now?
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.