Hi. Thanks for making gym available to other languages. I'm currently seeing an error when trying to reset the Blackjack-v0 environment. Here's a reproducible example using curl
# start the server
python gym_http_server.py
# create blackjack instance
curl -d '{"env_id":"Blackjack-v0"}' -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/v1/envs/
# reset instance
curl -X POST http://127.0.0.1:5000/v1/envs/<instance_id>/reset/
The issue I believe is caused when calling env.observation_space.to_jsonable(obs) in reset(). The to_jsonable method expects a list of tuples for Blackjack, not a single tuple.
My current workaround is to check to see if the observation is a tuple and if so, wrap it a list first. This works fine for Blackjack but I haven't tested the other environments.
Hi. Thanks for making gym available to other languages. I'm currently seeing an error when trying to reset the Blackjack-v0 environment. Here's a reproducible example using curl
The issue I believe is caused when calling env.observation_space.to_jsonable(obs) in
reset()
. Theto_jsonable
method expects a list of tuples for Blackjack, not a single tuple.My current workaround is to check to see if the observation is a tuple and if so, wrap it a list first. This works fine for Blackjack but I haven't tested the other environments.