Skip to content

TypeError: 0 is not JSON serializable #40

@markusdumke

Description

@markusdumke

I'm using the gym API in R running the example_agent.R file.

When I use the CartPole-v0 environment this works fine, but then I try the "FrozenLake-v0" I get an error: Error: API did not return json when I run

for (i in 1:episode_count) { ob <- env_reset(client, instance_id) for (i in 1:max_steps) { action <- env_action_space_sample(client, instance_id) results <- env_step(client, instance_id, action, render = TRUE) if (results[["done"]]) break } }

and in my WinPython Command Prompt (Python 3.6.0.1Qt5) I get the following error:

TypeError: 0 is not JSON serializable

Hope, someone can help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions