Install/Dependency issues when trying to play on remote server

71 views
Skip to first unread message

Ross Allen

unread,
Mar 9, 2020, 2:21:20 PM3/9/20
to Google Research Football
After many attempts and hours of troubleshooting, I have been unable to connect to the Google Research Football League servers to play teams online. My problems seem to be connected to how the football environment is installed on my machine. I've been following installation directions here:
I will note that, due to other projects I work on, I am attempting to use a conda environment to manage dependencies.

One of the major hurdles I have encountered is that the installation creates multiple different gfootball python packages, each with different functions, which seems to cause endless conflicts and import errors. Specifically, my install has gfootball packages located at:

  • .../football/build/lib.linux-x86_64-3.8/gfootball/
  • ...//football/gfootball/
  • ~/.local/lib/python3.5/site-packages/gfootball/
Can anyone tell if I did something wrong during installation? How do others manage these seems conflicting package dependencies? Does anyone have examples they could share of how they kick off I've found some work-arounds using PYTHONPATH, but they are hacks and don't work for all cases.

To give you an idea of the errors I am running into, if I try to start a league game on the default track, I get this error (team name and token removed):
cd football
PYTHONPATH=/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/:/home/ross/Projects/GRFL/football/ python gfootball/eval_server/example_client.py --username <team name> --token <team token>
I0309
13:09:05.644010 140027944847104 remote_football_env.py:82] Error HTTP Error 404: Not Found, sleeping 10 secs

If instead I try to run a game on the multiagent track, I get the following:
PYTHONPATH=/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/:/home/ross/Projects/GRFL/football/ python gfootball/eval_server/example_client.py --username <team name> --token <team token> --track multiagent --how_many 1
Traceback (most recent call last):
 
File "gfootball/eval_server/example_client.py", line 105, in <module>
    app
.run(main)
 
File "/home/ross/miniconda2/envs/grfl/lib/python3.7/site-packages/absl/app.py", line 299, in run
    _run_main
(main, args)
 
File "/home/ross/miniconda2/envs/grfl/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
    sys
.exit(main(argv))
 
File "gfootball/eval_server/example_client.py", line 86, in main
    include_rendering
=FLAGS.render)
 
File "/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/gfootball/env/__init__.py", line 234, in create_remote_environment
   
from gfootball.env import remote_football_env
 
File "/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/gfootball/env/remote_football_env.py", line 22, in <module>
   
from gfootball.eval_server import config
ModuleNotFoundError: No module named 'gfootball.eval_server'

Thank you!



Anton Raichuk

unread,
Mar 10, 2020, 5:42:53 AM3/10/20
to Ross Allen, Google Research Football
On Mon, Mar 9, 2020 at 7:21 PM Ross Allen <ross.emer...@gmail.com> wrote:
After many attempts and hours of troubleshooting, I have been unable to connect to the Google Research Football League servers to play teams online. My problems seem to be connected to how the football environment is installed on my machine. I've been following installation directions here:
I will note that, due to other projects I work on, I am attempting to use a conda environment to manage dependencies.

One of the major hurdles I have encountered is that the installation creates multiple different gfootball python packages, each with different functions, which seems to cause endless conflicts and import errors. Specifically, my install has gfootball packages located at:

  • .../football/build/lib.linux-x86_64-3.8/gfootball/
  • ...//football/gfootball/
  • ~/.local/lib/python3.5/site-packages/gfootball/
Can anyone tell if I did something wrong during installation? How do others manage these seems conflicting package dependencies? Does anyone have examples they could share of how they kick off I've found some work-arounds using PYTHONPATH, but they are hacks and don't work for all cases.

To give you an idea of the errors I am running into, if I try to start a league game on the default track, I get this error (team name and token removed):
cd football
PYTHONPATH=/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/:/home/ross/Projects/GRFL/football/ python gfootball/eval_server/example_client.py --username <team name> --token <team token>
I0309
13:09:05.644010 140027944847104 remote_football_env.py:82] Error HTTP Error 404: Not Found, sleeping 10 secs


I guess this is expected, since you did not specify --track, which results in us trying to find non existing track to connect to.
 
If instead I try to run a game on the multiagent track, I get the following:
PYTHONPATH=/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/:/home/ross/Projects/GRFL/football/ python gfootball/eval_server/example_client.py --username <team name> --token <team token> --track multiagent --how_many 1
Traceback (most recent call last):
 
File "gfootball/eval_server/example_client.py", line 105, in <module>
    app
.run(main)
 
File "/home/ross/miniconda2/envs/grfl/lib/python3.7/site-packages/absl/app.py", line 299, in run
    _run_main
(main, args)
 
File "/home/ross/miniconda2/envs/grfl/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
    sys
.exit(main(argv))
 
File "gfootball/eval_server/example_client.py", line 86, in main
    include_rendering
=FLAGS.render)
 
File "/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/gfootball/env/__init__.py", line 234, in create_remote_environment
   
from gfootball.env import remote_football_env
 
File "/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/gfootball/env/remote_football_env.py", line 22, in <module>
   
from gfootball.eval_server import config
ModuleNotFoundError: No module named 'gfootball.eval_server'


Could you print where gfootball module points to?
And 'ls' that directory to see if there's eval_server subdirectory in there?

 
Thank you!



--
You received this message because you are subscribed to the Google Groups "Google Research Football" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-research-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-research-football/6c98d9d9-f9e6-4aff-9915-c47737456703%40googlegroups.com.

Ross Allen

unread,
Mar 10, 2020, 2:00:24 PM3/10/20
to Google Research Football
Using the PYTHONPATH defined, gfootball module points to lib.linux-x86_64-3.8/gfootball

$ cd /home/ross/Projects/GRFL/football
$ PYTHONPATH
=/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/:/home/ross/Projects/GRFL/football/ python
>>> import gfootball
>>> print(gfootball.__file__)
/home/ross/Projects/GRFL/football/build/lib.linux-x86_64-3.8/gfootball/__init__.py


I can get the gfootball module to point to the football/gfootball path if I switch the ordering of PYTHONPATH definition. How should I know which ordering is correct? Why is the gfootball module defined in multiple places in the first place?

Thank you for your time and help,
Ross

On Tuesday, March 10, 2020 at 5:42:53 AM UTC-4, raveman wrote:

Anton Raichuk

unread,
Mar 10, 2020, 2:07:01 PM3/10/20
to Ross Allen, Google Research Football
You mentioned that you have gfootball installed 3 times, do all 3 directories have eval_server directly?
How is the content of them different?

To be frank, I have not seen such a case that it has been installed multiple times before.
You say that if you take clean machine and execute:

git clone https://github.com/google-research/football.git
cd football
pip3 install .

You'll get it installed 3 times? Find it hard to believe :)
Maybe it has something to do with conda?



--
You received this message because you are subscribed to the Google Groups "Google Research Football" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-research-fo...@googlegroups.com.

Ross Allen

unread,
Mar 10, 2020, 2:24:33 PM3/10/20
to Google Research Football
Thank you for your response.

I agree that it could very well have something to do with conda. The problem is that I don't have a clean machine I can just run this on and I need to be able to de-conflict dependencies with other projects (e.g. this projects use python 3 but I have other projects that must use python 2). To avoid all this, I attempted to use the Docker instructions, but that led to it's own sequence of errors that I gave up on trying to debug.

Would you be able to share a command-line execution of example_client.py that works for you? From what directory do you run your command? What is your PYTHONPATH? Do you have a build/ directory in your repo?

Thank you for your time,
Ross

Ross Allen

unread,
Mar 10, 2020, 2:27:35 PM3/10/20
to Google Research Football
Also, to answer your other question, eval_server only exists in my home/ross/Projects/GRFL/football/gfootball/eval_server. The others do not have an eval_server directory

Anton Raichuk

unread,
Mar 10, 2020, 3:03:35 PM3/10/20
to Ross Allen, Google Research Football
$ python3
Python 3.6.8 (default, Oct  7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gfootball
>>> gfootball.__file__
'/home/raveman/.local/lib/python3.6/site-packages/gfootball/__init__.py'

And indeed inside of this directory there's no eval_server directory. So that matches what you are seeing.

But when we run example_client, we run it from inside the directory with the code.

$ python3 -u -m gfootball.eval_server.example_client
and then this
>>> import gfootball
>>> gfootball.__file__
would produce
<module 'gfootball' from '/home/raveman/gfootball/gfootball/__init__.py'>

and inside /home/raveman/gfootball/gfootball/ there is eval_server directory.

So try running example_client from the directory where you cloned github repo.
And don't give any PYTHONPATH and specify properly the --track flag.

Let me know what it gives you now.


--
You received this message because you are subscribed to the Google Groups "Google Research Football" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-research-fo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages