Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[retro-contest] error at bridge.py on Windows #19

Closed
decoderkurt opened this issue Apr 22, 2018 · 5 comments
Closed

[retro-contest] error at bridge.py on Windows #19

decoderkurt opened this issue Apr 22, 2018 · 5 comments

Comments

@decoderkurt
Copy link

I am using windows 10. tried to retro-contest-run rainbow agent.
while running, I got error like this

D:\project>retro-contest run --agent $DOCKER_REGISTRY/rainbow_agent:v1 --results-dir results --no-nv --use-host-data SonicTheHedgehog-Genesis GreenHillZone.Act1

Traceback (most recent call last):
File "/root/compo/agent.py", line 46, in
main()
File "/root/compo/agent.py", line 22, in main
env = AllowBacktracking(make_env(stack=False, scale_rew=False))
File "/root/compo/sonic_util.py", line 15, in make_env
env = grc.RemoteEnv('tmp/sock')
File "/root/venv/lib/python3.5/site-packages/gym_remote/client.py", line 15, in init
self.bridge.connect()
File "/root/venv/lib/python3.5/site-packages/gym_remote/bridge.py", line 251, in connect
self.sock.connect(sock_path)
FileNotFoundError: [Errno 2] No such file or directory
Remote exited uncleanly: 1
Agent exited uncleanly 1

@decoderkurt decoderkurt changed the title [retro-contest] bridge.py error on Windows [retro-contest] error at bridge.py on Windows Apr 22, 2018
@endrift
Copy link
Contributor

endrift commented Apr 25, 2018

What are the contents of results/remote-stderr.txt?

@decoderkurt
Copy link
Author

This is my results/remote-stderr.txt

Traceback (most recent call last):
File "/root/venv/lib/python3.5/site-packages/retro_contest/local.py", line 11, in make
env = retro.make(game, state, scenario='contest', use_restricted_actions=use_restricted_actions)
File "/root/venv/lib/python3.5/site-packages/retro/init.py", line 120, in make
return RetroEnv(game, state, **kwargs)
File "/root/venv/lib/python3.5/site-packages/retro/retro_env.py", line 70, in init
with gzip.open(os.path.join(game_path, state), 'rb') as fh:
File "/usr/lib/python3.5/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.5/gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/root/data/SonicTheHedgehog-Genesis/MarbleGardenZone.Act2.state'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/venv/bin/retro-contest-remote", line 9, in
load_entry_point('retro-contest-support==0.1.0', 'console_scripts', 'retro-contest-remote')()
File "/root/venv/lib/python3.5/site-packages/retro_contest/remote.py", line 98, in main
args.func(args)
File "/root/venv/lib/python3.5/site-packages/retro_contest/remote.py", line 41, in run_args
daemonize=args.daemonize)
File "/root/venv/lib/python3.5/site-packages/retro_contest/remote.py", line 30, in run
env = make(game, state, bk2dir, monitordir, discrete_actions, socketdir)
File "/root/venv/lib/python3.5/site-packages/retro_contest/remote.py", line 14, in make
env = retro_contest.local.make(game, state, discrete_actions=discrete_actions, bk2dir=bk2dir)
File "/root/venv/lib/python3.5/site-packages/retro_contest/local.py", line 13, in make
env = retro.make(game, state, use_restricted_actions=use_restricted_actions)
File "/root/venv/lib/python3.5/site-packages/retro/init.py", line 120, in make
return RetroEnv(game, state, **kwargs)
File "/root/venv/lib/python3.5/site-packages/retro/retro_env.py", line 70, in init
with gzip.open(os.path.join(game_path, state), 'rb') as fh:
File "/usr/lib/python3.5/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.5/gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/root/data/SonicTheHedgehog-Genesis/MarbleGardenZone.Act2.state'


this is agent-stderr,txt

Traceback (most recent call last):
File "/root/compo/agent.py", line 102, in
main()
File "/root/compo/agent.py", line 78, in main
env = AllowBacktracking(make_env(stack=False, scale_rew=False))
File "/root/compo/custom_sonic_util.py", line 15, in make_env
env = grc.RemoteEnv('tmp/sock')
File "/root/venv/lib/python3.5/site-packages/gym_remote/client.py", line 15, in init
self.bridge.connect()
File "/root/venv/lib/python3.5/site-packages/gym_remote/bridge.py", line 251, in connect
self.sock.connect(sock_path)
FileNotFoundError: [Errno 2] No such file or directory

@endrift
Copy link
Contributor

endrift commented Apr 25, 2018

Did you install gym-retro and the ROMs on the host?

@decoderkurt
Copy link
Author

decoderkurt commented Apr 25, 2018

simple agent works with bk2 and monitor.cvs files in result directory.
I think gym-retro and ROM are installed already without problems.


D:\project\simple-agent>retro-contest run --agent $DOCKER_REGISTRY/simple-agent:v1 --results-dir results --no-nv --use-host-data SonicTheHedgehog-Genesis GreenHillZone.Act1
connecting to remote environment
starting episode
episode complete
episode complete
episode complete
episode complete

@decoderkurt
Copy link
Author

I found the reason. there were some errors in the .state name. I modified state name and it worked!
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants