allenai/ai2thor

error about aothor

Fu-Dayuan opened this issue · 2 comments

I just use the code below to check the environment

import time
import ai2thor.controller
controller = ai2thor.controller.Controller(port=5900,x_display="10")
controller.start()
print(f"Start Resetting")
controller.reset('FloorPlan28')
print(f"Start Initializing")
controller.step(dict(action='Initialize', gridSize=0.25))
for i in range(10):
    print(f"Start stepping {i}")
    event = controller.step(dict(action='MoveAhead'))
    print(f"Finish stepping {i}")
    time.sleep(1)

event.frame
event.cv2img
event.metadata

when I run this script, it present a error

MYLOCATION/site-packages/ai2thor/controller.py:1150: UserWarning: start method depreciated. The server started when the Controller was initialized.
  warnings.warn(
Traceback (most recent call last):
  File "test_ai2thor.py", line 10, in <module>
    controller.start()
  File "MYLOCATION/site-packages/ai2thor/controller.py", line 1162, in start
    self.server.start()
  File "MYLOCATION/site-packages/ai2thor/fifo_server.py", line 202, in start
    os.mkfifo(self.server_pipe_path)
FileExistsError: [Errno 17] File exists

After I remove the controller.start() line, it presents Start stepping {i} and Finish stepping {i} but there is no windows to show the picture.
What's wrong with that? I just use a realVNC viewer to connect my server(with virtual desktop), so should I change some config? (ai2thor==3.1.0)

I just use the code below to check the environment我只是使用下面的代码来检查环境

import time
import ai2thor.controller
controller = ai2thor.controller.Controller(port=5900,x_display="10")
controller.start()
print(f"Start Resetting")
controller.reset('FloorPlan28')
print(f"Start Initializing")
controller.step(dict(action='Initialize', gridSize=0.25))
for i in range(10):
    print(f"Start stepping {i}")
    event = controller.step(dict(action='MoveAhead'))
    print(f"Finish stepping {i}")
    time.sleep(1)

event.frame
event.cv2img
event.metadata

when I run this script, it present a error当我运行此脚本时,它显示错误

MYLOCATION/site-packages/ai2thor/controller.py:1150: UserWarning: start method depreciated. The server started when the Controller was initialized.
  warnings.warn(
Traceback (most recent call last):
  File "test_ai2thor.py", line 10, in <module>
    controller.start()
  File "MYLOCATION/site-packages/ai2thor/controller.py", line 1162, in start
    self.server.start()
  File "MYLOCATION/site-packages/ai2thor/fifo_server.py", line 202, in start
    os.mkfifo(self.server_pipe_path)
FileExistsError: [Errno 17] File exists

After I remove the controller.start() line, it presents Start stepping {i} and Finish stepping {i} but there is no windows to show the picture.删除 controller.start() 行后,它显示 Start step {i} 和 Finish step {i},但没有窗口显示图片。 What's wrong with that? I just use a realVNC viewer to connect my server(with virtual desktop), so should I change some config? (ai2thor==3.1.0)这有什么问题呢?我只是使用真正的 VNC 查看器来连接我的服务器(带有虚拟桌面),那么我应该更改一些配置吗?(ai2thor==3.1.0)

Hello, I encountered the same issue. Have you resolved it

I just use the code below to check the environment我只是使用下面的代码来检查环境

import time
import ai2thor.controller
controller = ai2thor.controller.Controller(port=5900,x_display="10")
controller.start()
print(f"Start Resetting")
controller.reset('FloorPlan28')
print(f"Start Initializing")
controller.step(dict(action='Initialize', gridSize=0.25))
for i in range(10):
    print(f"Start stepping {i}")
    event = controller.step(dict(action='MoveAhead'))
    print(f"Finish stepping {i}")
    time.sleep(1)

event.frame
event.cv2img
event.metadata

when I run this script, it present a error当我运行此脚本时,它显示错误

MYLOCATION/site-packages/ai2thor/controller.py:1150: UserWarning: start method depreciated. The server started when the Controller was initialized.
  warnings.warn(
Traceback (most recent call last):
  File "test_ai2thor.py", line 10, in <module>
    controller.start()
  File "MYLOCATION/site-packages/ai2thor/controller.py", line 1162, in start
    self.server.start()
  File "MYLOCATION/site-packages/ai2thor/fifo_server.py", line 202, in start
    os.mkfifo(self.server_pipe_path)
FileExistsError: [Errno 17] File exists

After I remove the controller.start() line, it presents Start stepping {i} and Finish stepping {i} but there is no windows to show the picture.删除 controller.start() 行后,它显示 Start step {i} 和 Finish step {i},但没有窗口显示图片。 What's wrong with that? I just use a realVNC viewer to connect my server(with virtual desktop), so should I change some config? (ai2thor==3.1.0)这有什么问题呢?我只是使用真正的 VNC 查看器来连接我的服务器(带有虚拟桌面),那么我应该更改一些配置吗?(ai2thor==3.1.0)

Hello, I encountered the same issue. Have you resolved it

具体我忘了,但是好像在带显卡的windows pc上是可以跑的,linux可以看看有没有把整个过程的视频保存下来的方法