'UnityEnvironment' object has no attribute 'behavior_spec'

[I followed this ml-agents/docs/Learning-Environment-Executable.md at main · Unity-Technologies/ml-agents · GitHub to create environment of my own.
But when i run this
from mlagents_envs.environment import UnityEnvironment
env = UnityEnvironment(file_name=“v1-ball-cube-game.x86_64”)

env.reset()
behavior_names = env.behavior_spec.keys()
print(behavior_names)
Game window pop up and then terminal show error saying
Traceback (most recent call last):
File “index.py”, line 6, in
behavior_names = env.behavior_spec.keys()
AttributeError: ‘UnityEnvironment’ object has no attribute ‘behavior_spec’
I created environment by following ml-agents/docs/Learning-Environment-Create-New.md at main · Unity-Technologies/ml-agents · GitHub ( it make without brain ) and i was able to train modal by .conf file. Now i wanted to connect to python API.
](ml-agents/docs/Learning-Environment-Create-New.md at main · Unity-Technologies/ml-agents · GitHub)

I have the same problem, any updates? Did you fix it?

Ok I think it is due to a different version of ml-agents. Try get_behavior_spec()