-
Notifications
You must be signed in to change notification settings - Fork 115
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: 'TimeLimit' object has no attribute 'get_obs', How to solve this problem? #207
Comments
hi @llll111111 can you please add information on OS, python version and myosuite version? Also, a snippet of code to reproduce the problem? |
Had similar issues, resolved by tighter bookkeeping on environment wrappers and distinguishing between training and evaluation/preview/demo environment: Pretty sure this is an env wrapping/stacking topic. If u call Just some good guesses from the error, as @Vittorio-Caggiano mentioned for more input at least a stacktrace is required. |
thanks @gandie ... may I ask you to provide a minimal example? it seems you might have already a fix too... happy to review a PR too :) |
Hm i think it's rather a mistake in usage than something wrong with the code here. I can produce similar looking errors by building a env = SubprocVecEnv([gym.make('myoLegWalk-v0') for i in range(24)]) ... will run into:
When we create an arbitrary env in Python shell: from myosuite.utils import gym
env = gym.make('myoLegWalk-v0') ... and check the wrapped environment we get: >>> env
<TimeLimit<OrderEnforcing<PassiveEnvChecker<WalkEnvV0<myoLegWalk-v0>>>>> Btw >>> env.get_obs
C:\Users\lars\myosuite\venv\lib\site-packages\gymnasium\core.py:311: UserWarning: WARN: env.get_obs to get variables from other wrappers is deprecated and will be removed in v1.0, to get this variable you can do `env.unwrapped.get_obs` for environment variables or `env.get_wrapper_attr('get_obs')` that will search the reminding wrappers.
logger.warn(
<bound method MujocoEnv.get_obs of <myosuite.envs.myo.myobase.walk_v0.WalkEnvV0 object at 0x000001F03CB14CA0> and even get a warning to avoid grabbing into env this way. Sooo, to round things up i'd say if you encountered |
No description provided.
The text was updated successfully, but these errors were encountered: