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

AttributeError: 'dict' object has no attribute 'split' #248

Closed
GMMDMDIDEMS opened this issue Feb 18, 2024 · 1 comment
Closed

AttributeError: 'dict' object has no attribute 'split' #248

GMMDMDIDEMS opened this issue Feb 18, 2024 · 1 comment

Comments

@GMMDMDIDEMS
Copy link
Contributor

There is either an error in def reset(...) or in def run_round(...).

In def run_round(...) state = self.env.reset() is getting assigned a tuple of (obs, {}) from def reset(...).
However, def build_state_msg(..) expects state to be a dict whose key must be a str in order to be able to call split(...).

Possible fixes

  1. Only return obs in def reset(...)
  2. Or state, _ = self.env.reset() in def run_round(...)
@mike-gimelfarb
Copy link
Collaborator

Thanks for the fix, it is indeed a missed usage of env that was forgotten when upgrading to gymnasium.

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