Closed 1996srikesh closed 2 years ago
Could you post a snippet of code the reproduces the error independent of your training code?
from ai2thor.controller import Controller import ai2thor.wsgi_server import sys sys.path.insert(0, '/content/ai2thor/ai2thor') from ai2thor.platform import CloudRendering init_params = {'base_dir': '/root/.ai2thor/', 'local_executable_path': '/root/.ai2thor/releases/thor-CloudRendering-54535f6b9d76896c2ccb4532727aeda5741a9061/thor-CloudRendering-54535f6b9d76896c2ccb4532727aeda5741a9061', 'scene': 'FloorPlan218_physics', 'gridSize': 0.25, 'snapToGrid': True, 'visibilityDistance': 1.5, 'width': 900, 'height': 900, 'agentCount': 1, 'commit_id': '54535f6b9d76896c2ccb4532727aeda5741a9061', 'server_class': ai2thor.wsgi_server.WsgiServer, 'platform': ai2thor.platform.CloudRendering, 'headless': False}
controller = Controller(**init_params) event = controller.step(action="RotateRight") metadata = event.metadata print(event, event.metadata.keys())
I think I found the issue; removing commit_id and local_executable_path solved it for me; not sure why though.
Hi @ekolve @mattdeitke ,
I'm running ai2-thor on colab and trying to initialize an episode for imitation learning on TEACh dataset. I'm using their simulator_THOR.py (which internally calls start_new_episode of the Controller class when initializing/starting up)
I'm calling start_new_episode, which gives the following error in its call the subprocess:
File "train_reinforce.py", line 55, in
agent.train()
File "/content/Project/blocks/BlockWorldRoboticAgent/agent.py", line 292, in train
self.learning_alg.train(self.sess, self.train_writer)
File "/content/Project/blocks/BlockWorldRoboticAgent/learning/policy_gradient.py", line 163, in train
simulator.start_new_episode()#episode_id=g
File "/content/Project/blocks/BlockWorldRoboticAgent/teach/simulators/simulator_THOR.py", line 424, in start_new_episode
self.launch_simulator(world=world, world_type=world_type)
File "/content/Project/blocks/BlockWorldRoboticAgent/teach/simulators/simulator_THOR.py", line 2348, in launch_simulator
self.controller = TEAChController(init_params)
File "/content/Project/blocks/BlockWorldRoboticAgent/teach/simulators/simulator_THOR.py", line 45, in init
super().init(kwargs)
File "/usr/local/lib/python3.7/dist-packages/ai2thor/controller.py", line 498, in init
host=host,
File "/usr/local/lib/python3.7/dist-packages/ai2thor/controller.py", line 1292, in start
self._start_unity_thread(env, width, height, unity_params, image_name)
File "/usr/local/lib/python3.7/dist-packages/ai2thor/controller.py", line 1007, in _start_unity_thread
stderr=open(os.path.join(self.log_dir, "unity.log"), "a"),
File "/usr/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1462, in _execute_child
env_list.append(k + b'=' + os.fsencode(v))
File "/usr/lib/python3.7/os.py", line 812, in fsencode
filename = fspath(filename) # Does type-checking of
filename
. TypeError: expected str, bytes or os.PathLike object, not NoneTypeThe stdout and stderr paths seem to be right, I overloaded the log_dir jic (i.e. w/ the @property attribute). From the code it looks like command is a str and env is a dict; not sure where the error is. Seems to be complaining about the filename, but can't add print statements to verify and it should already be pointing to /root/.ai2thor/log