Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

raise grpc.FutureTimeoutError() grpc.FutureTimeoutError #1

Closed
vis7 opened this issue Feb 12, 2021 · 5 comments
Closed

raise grpc.FutureTimeoutError() grpc.FutureTimeoutError #1

vis7 opened this issue Feb 12, 2021 · 5 comments

Comments

@vis7
Copy link
Contributor

vis7 commented Feb 12, 2021

followed instruction from readme below

$ git clone https://github.com/deepmind/dm_alchemy.git
$ pip install wheel
$ pip install --upgrade setuptools
$ pip install ./dm_alchemy
$ pip install pygame

and then try to run human_agent.py using below command getting error

python human_agent.py --seed 123 --level_name 'alchemy/perceptual_mapping_randomized_with_rotation_and_random_bottleneck'

pygame 2.0.1 (SDL 2.0.14, Python 3.7.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
I0212 16:02:42.783728 140172242384704 _load_environment.py:377] Downloading docker image "gcr.io/deepmind-environments/alchemy:v1.0.0"...
I0212 16:03:59.853875 140172242384704 _load_environment.py:379] Download finished.
Traceback (most recent call last):
  File "human_agent.py", line 186, in <module>
    app.run(main)
  File "/home/venv/lib/python3.7/site-packages/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/home/venv/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "human_agent.py", line 117, in main
    environment_variables=environment_variables) as env:
  File "/home/venv/lib/python3.7/site-packages/dm_alchemy/_load_environment.py", line 389, in load_from_docker
    connection_details=_connect_to_environment(port, settings),
  File "/home/venv/lib/python3.7/site-packages/dm_alchemy/_load_environment.py", line 246, in _connect_to_environment
    channel, connection = _create_channel_and_connection(port)
  File "/home/venv/lib/python3.7/site-packages/dm_alchemy/_load_environment.py", line 204, in _create_channel_and_connection
    _check_grpc_channel_ready(channel)
  File "/home/venv/lib/python3.7/site-packages/dm_alchemy/_load_environment.py", line 183, in _check_grpc_channel_ready
    return grpc.channel_ready_future(channel).result(timeout=1)
  File "/home/venv/lib/python3.7/site-packages/grpc/_utilities.py", line 140, in result
    self._block(timeout)
  File "/home/venv/lib/python3.7/site-packages/grpc/_utilities.py", line 86, in _block
    raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError
@MichaelJKing
Copy link
Contributor

Hi Vishvajeet,

It looks like you are running in Linux in a virtual environment using python 3.7 which is all fine. One possibility is that your docker is not set up correctly. Can you successfully run docker run hello-world and docker run -d gcr.io/deepmind-environments/dm_alchemy:v1.0.0? Note, if you can't run without sudo you will need to follow the instructions at https://docs.docker.com/engine/install/linux-postinstall/.

Also note, to run the examples you can run pip install ./dm_alchemy[examples] which will take care of dependencies like pygame.

@vis7
Copy link
Contributor Author

vis7 commented Feb 13, 2021

first command run successfully. while running below commnad

docker run -d gcr.io/deepmind-environments/dm_alchemy:v1.0.0

got error

Unable to find image 'gcr.io/deepmind-environments/dm_alchemy:v1.0.0' locally docker: Error response from daemon: manifest for gcr.io/deepmind-environments/dm_alchemy:v1.0.0 not found: manifest unknown: Failed to fetch "v1.0.0" from request "/v2/deepmind-environments/dm_alchemy/manifests/v1.0.0". See 'docker run --help'.

while trying to fetch docker from cloud

docker pull gcr.io/deepmind-environments/dm_alchemy:v1.0.0

Error response from daemon: manifest for gcr.io/deepmind-environments/dm_alchemy:v1.0.0 not found: manifest unknown: Failed to fetch "v1.0.0" from request "/v2/deepmind-environments/dm_alchemy/manifests/v1.0.0".

it looks like it is not able to find gcr.io/deepmind-environments/dm_alchemy:v1.0.0 on GCR

@MichaelJKing
Copy link
Contributor

Sorry, my mistake, that command should have been docker run -d gcr.io/deepmind-environments/alchemy:v1.0.0

@vis7
Copy link
Contributor Author

vis7 commented Feb 16, 2021

Thank you @MichaelJKing That worked. I updated Readme with correct environment and made pull request. consider that

@vis7 vis7 closed this as completed Feb 16, 2021
@jthomy
Copy link

jthomy commented Mar 23, 2021

unfortunately on windows, I run into the same error trace trying to run human_agent.py:

pygame 2.0.1 (SDL 2.0.14, Python 3.7.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "human_agent.py", line 186, in <module>
    app.run(main)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\app.py", line 303, in run
    _run_main(main, args)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "human_agent.py", line 117, in main
    environment_variables=environment_variables) as env:
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\dm_alchemy\_load_environment.py", line 389, in load_from_docker
    connection_details=_connect_to_environment(port, settings),
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\dm_alchemy\_load_environment.py", line 246, in _connect_to_environment
    channel, connection = _create_channel_and_connection(port)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\dm_alchemy\_load_environment.py", line 204, in _create_channel_and_connection
    _check_grpc_channel_ready(channel)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\dm_alchemy\_load_environment.py", line 183, in _check_grpc_channel_ready
    return grpc.channel_ready_future(channel).result(timeout=1)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\grpc\_utilities.py", line 140, in result
    self._block(timeout)
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python37\lib\site-packages\grpc\_utilities.py", line 86, in _block
    raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError

the command that is mentioned above does not seem to help. Running

level_name = 'alchemy/perceptual_mapping_randomized_with_rotation_and_random_bottleneck'
seed = 1023
settings = dm_alchemy.EnvironmentSettings(
    seed=seed, level_name=level_name, width=width, height=height)
env = dm_alchemy.load_from_docker(settings)

in the AlchemyGettingStarted.ipynb gives the same error.
The setup is as written in the guide and uses Docker Desktop (except that I don't use a Python virtual environment).
docker run -d gcr.io/deepmind-environments/alchemy:v1.0.0 gives no error.

Shall I open a new issue? While you officially don't support windows maybe you can still help me?

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

No branches or pull requests

3 participants