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

EpisodeData len overload #65

Closed
Tezirg opened this issue May 5, 2020 · 1 comment
Closed

EpisodeData len overload #65

Tezirg opened this issue May 5, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Tezirg
Copy link
Contributor

Tezirg commented May 5, 2020

In any version, getting the length of an Episode loaded from disk crashes:

from grid2op.Episode import EpisodeData

logs_path = "./my_runner_output_dir"
episode_id = "0001" 
episode_data = EpisodeData.from_disk(agent_path=logs_path, name=episode_id)
n_steps = len(episode_data)

Overloading __len__ should return an integer type. Instead we have the following:

TypeError: 'str' object cannot be interpreted as an integer
@Tezirg Tezirg added the bug Something isn't working label May 5, 2020
BDonnot referenced this issue in BDonnot/Grid2Op May 5, 2020
BDonnot referenced this issue in BDonnot/Grid2Op May 5, 2020
@BDonnot BDonnot mentioned this issue May 6, 2020
@BDonnot
Copy link
Collaborator

BDonnot commented May 6, 2020

Fixed in version v0.8.1

@BDonnot BDonnot closed this as completed May 6, 2020
BDonnot added a commit that referenced this issue Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants