我正在尝试从Google Research Football Environment安装 python 模块 gfootball 。按照 Mac 网站上显示的安装说明进行操作(我使用的是 macOS High Sierra (10.13.6) 和 Xcode 9.4),我使用以下内容测试了设置:# test_gfootball.pyimport gfootball.env as football_envenv = football_env.create_environment(env_name="academy_empty_goal_close")env.reset()env.close()但我收到以下错误:File "test_gfootball.py", line 5, in <module> env = football_env.create_environment(env_name="academy_empty_goal_close") File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/env/__init__.py", line 182, in create_environment scenario_config = config.Config({'level': env_name}).ScenarioConfig() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/env/config.py", line 98, in __init__ self.NewScenario() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/env/config.py", line 153, in NewScenario self._scenario_cfg = scenario_builder.Scenario(self).ScenarioConfig() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/env/scenario_builder.py", line 62, in __init__ scenario.build_scenario(self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/scenarios/academy_empty_goal_close.py", line 33, in build_scenario builder.AddPlayer(-1.0, 0.0, e_PlayerRole_GK) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gfootball/env/scenario_builder.py", line 108, in AddPlayer player = Player(x, y, role, lazy, controllable)TypeError: __init__() should return None, not 'NoneType'我已经处理了错误消息中指定的文件,但据我所知,一切似乎都很好。我怀疑使用“env_name”的调用有问题 - 也许它找不到场景 - “academy_empty_goal_close.我还应该检查什么才能发现问题?
1 回答
![?](http://img1.sycdn.imooc.com/533e4c0500010c7602000200-100-100.jpg)
互换的青春
TA贡献1797条经验 获得超6个赞
似乎是某些 Conda 环境的已知问题:https ://github.com/google-research/football/issues/156
添加回答
举报
0/150
提交
取消