我正在嘗試從Google Research Football Environment安裝 python 模塊 gfootball 。按照 Mac 網(wǎng)站上顯示的安裝說明進行操作(我使用的是 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'我已經(jīng)處理了錯誤消息中指定的文件,但據(jù)我所知,一切似乎都很好。我懷疑使用“env_name”的調用有問題 - 也許它找不到場景 - “academy_empty_goal_close.我還應該檢查什么才能發(fā)現(xiàn)問題?
1 回答

互換的青春
TA貢獻1797條經(jīng)驗 獲得超6個贊
似乎是某些 Conda 環(huán)境的已知問題:https ://github.com/google-research/football/issues/156
添加回答
舉報
0/150
提交
取消